1. python_mirrors
  2. sandbox/regex-integration


Benjamin Peterson  committed 089a086

note that get() is not affected by default_factory (closes #13887)

  • Participants
  • Parent commits e21dd3c
  • Branches 3.2

Comments (0)

Files changed (1)

File Doc/library/collections.rst

View file
  • Ignore whitespace
       :class:`dict` class when the requested key is not found; whatever it
       returns or raises is then returned or raised by :meth:`__getitem__`.
+      Note that :meth:`__missing__` is *not* called for any operations besides
+      :meth:`__getitem__`. This means that :meth:`get` will, like normal
+      dictionaries, return ``None`` as a default rather than using
+      :attr:`default_factory`.
    :class:`defaultdict` objects support the following instance variable: