PHP 8.2.30
Preview: typing.py Size: 1.38 KB
//proc/self/root/opt/alt/python37/lib64/python3.7/site-packages/pyrsistent/typing.py

"""Helpers for use with type annotation.

Use the empty classes in this module when annotating the types of Pyrsistent
objects, instead of using the actual collection class.

For example,

    from pyrsistent import pvector
    from pyrsistent.typing import PVector

    myvector: PVector[str] = pvector(['a', 'b', 'c'])

"""

try:
    from typing import Container
    from typing import Hashable
    from typing import Generic
    from typing import Iterable
    from typing import Mapping
    from typing import Sequence
    from typing import Sized
    from typing import TypeVar

    __all__ = ['CheckedPSet', 'CheckedPVector', 'PBag', 'PDeque', 'PList', 'PMap', 'PSet', 'PVector']

    T = TypeVar('T')
    KT = TypeVar('KT')
    VT = TypeVar('VT')

    # PSet.add and PSet.discard have different type signatures than that of Set.
    class CheckedPSet(Generic[T], Hashable):
        pass

    class CheckedPVector(Sequence[T], Hashable):
        pass

    class PBag(Container[T], Iterable[T], Sized, Hashable):
        pass

    class PDeque(Sequence[T], Hashable):
        pass

    class PList(Sequence[T], Hashable):
        pass

    class PMap(Mapping[KT, VT], Hashable):
        pass

    # PSet.add and PSet.discard have different type signatures than that of Set.
    class PSet(Generic[T], Hashable):
        pass

    class PVector(Sequence[T], Hashable):
        pass
except ImportError:
    pass

Directory Contents

Dirs: 1 × Files: 20

Name Size Perms Modified Actions
- drwxr-xr-x 2024-03-03 23:10:52
Edit Download
0 B lrw-r--r-- 2018-11-20 21:52:04
Edit Download
1.38 KB lrw-r--r-- 2018-11-17 05:52:33
Edit Download
6.87 KB lrw-r--r-- 2018-11-20 21:52:04
Edit Download
17.88 KB lrw-r--r-- 2018-10-14 10:06:35
Edit Download
521 B lrw-r--r-- 2018-10-14 10:06:35
Edit Download
10.55 KB lrw-r--r-- 2018-10-14 10:06:35
Edit Download
2.42 KB lrw-r--r-- 2018-07-07 13:53:48
Edit Download
3.48 KB lrw-r--r-- 2018-07-08 07:16:39
Edit Download
6.60 KB lrw-r--r-- 2018-10-14 10:06:35
Edit Download
9.18 KB lrw-r--r-- 2018-11-17 05:52:33
Edit Download
11.90 KB lrw-r--r-- 2018-10-14 10:06:35
Edit Download
8.09 KB lrw-r--r-- 2018-10-14 10:06:35
Edit Download
14.30 KB lrw-r--r-- 2018-10-14 10:06:35
Edit Download
6.42 KB lrw-r--r-- 2018-11-17 05:52:33
Edit Download
5.58 KB lrw-r--r-- 2018-10-14 10:06:35
Edit Download
22.20 KB lrw-r--r-- 2018-10-14 10:06:35
Edit Download
3.35 KB lrw-r--r-- 2018-07-07 13:53:48
Edit Download
3.50 KB lrw-r--r-- 2018-07-07 13:53:48
Edit Download
1.44 KB lrw-r--r-- 2018-07-07 13:53:48
Edit Download
4.93 KB lrw-r--r-- 2018-12-19 21:07:14
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).