]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Document vars behavior when __dict__ is missing (#21466)
authorAndre Delfino <adelfino@gmail.com>
Fri, 21 Aug 2020 22:29:34 +0000 (19:29 -0300)
committerGitHub <noreply@github.com>
Fri, 21 Aug 2020 22:29:34 +0000 (19:29 -0300)
Doc/library/functions.rst

index 43c47c1da9434c3af1b7347de690ca72e6f186dc..d381d43d8e99c35a8637be4a88340171a4470de8 100644 (file)
@@ -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)