test_genericalias now tests also frozendict.
.. seealso::
- :class:`types.MappingProxyType` can be used to create a read-only view
- of a :class:`dict`.
+ :class:`frozendict` and :class:`types.MappingProxyType` can be used to
+ create a read-only view of a :class:`dict`.
.. _thread-safety-dict:
* a class that inherits from any of the above
- The standard library classes "dict" and "types.MappingProxyType"
- are mappings.
+ The standard library classes "dict", "frozendict"
+ and "types.MappingProxyType" are mappings.
[4] A string literal appearing as the first statement in the function
body is transformed into the function’s "__doc__" attribute and
See also:
- "types.MappingProxyType" can be used to create a read-only view of a
- "dict".
+ "frozendict" and "types.MappingProxyType" can be used to create a read-only
+ view of a "dict".
Dictionary view objects
class BaseTest(unittest.TestCase):
"""Test basics."""
- generic_types = [type, tuple, list, dict, set, frozenset, enumerate, memoryview,
+ generic_types = [type, tuple, list, dict, frozendict,
+ set, frozenset, enumerate, memoryview,
slice,
defaultdict, deque,
SequenceMatcher,