sitecustomize._vendor.importlib_metadata._collections

Module Contents

Classes

FreezableDefaultDict

Often it is desirable to prevent the mutation of

Pair

Built-in immutable sequence.

class sitecustomize._vendor.importlib_metadata._collections.FreezableDefaultDict

Bases: collections.defaultdict

Often it is desirable to prevent the mutation of a default dict after its initial construction, such as to prevent mutation during iteration.

>>> dd = FreezableDefaultDict(list)
>>> dd[0].append('1')
>>> dd.freeze()
>>> dd[1]
[]
>>> len(dd)
1
__missing__(key)
freeze()
class sitecustomize._vendor.importlib_metadata._collections.Pair

Bases: collections.namedtuple('Pair', 'name value')

Built-in immutable sequence.

If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.

If the argument is a tuple, the return value is the same object.

classmethod parse(text)