8.2.34 | Linux | www-data (uid:33)
👁 View: _collections.py
📁 //snap/core22/current/usr/lib/python3.10/importlib/metadata/_collections.py
import collections # from jaraco.collections 3.3 class FreezableDefaultDict(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 """ def __missing__(self, key): return getattr(self, '_frozen', super().__missing__)(key) def freeze(self): self._frozen = lambda key: self.default_factory() class Pair(collections.namedtuple('Pair', 'name value')): @classmethod def parse(cls, text): return cls(*map(str.strip, text.split("=", 1)))
← Back
💻 Terminal
📤 Upload
📂
Click or Drag & Drop
📁 //snap/core22/current/usr/lib/python3.10/importlib/metadata
NameSizePermModifiedActions
📁 __pycache__/-07552026-08-24 03:28🗑 Delete
__init__.py29.9K06442026-06-22 18:55👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
_adapters.py1.8K06442026-06-22 18:55👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
_collections.py743B06442026-06-22 18:55👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
_functools.py2.8K06442026-06-22 18:55👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
_itertools.py607B06442026-06-22 18:55👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
_meta.py1.1K06442026-06-22 18:55👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
_text.py2.1K06442026-06-22 18:55👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del