From: Andre Delfino Date: Fri, 21 Aug 2020 22:29:34 +0000 (-0300) Subject: Document vars behavior when __dict__ is missing (#21466) X-Git-Tag: v3.10.0a1~230 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=802726acf6048338394a6a4750835c2cdd6a947b;p=thirdparty%2FPython%2Fcpython.git Document vars behavior when __dict__ is missing (#21466) --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 43c47c1da943..d381d43d8e99 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1734,6 +1734,9 @@ are always available. They are listed here in alphabetical order. locals dictionary is only useful for reads since updates to the locals dictionary are ignored. + A :exc:`TypeError` exception is raised if an object is specified but + it doesn't have a :attr:`~object.__dict__` attribute (for example, if + its class defines the :attr:`~object.__slots__` attribute). .. function:: zip(*iterables, strict=False)