]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Document vars behavior when __dict__ is missing (GH-21466) (GH-21941)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 22 Aug 2020 19:15:29 +0000 (12:15 -0700)
committerGitHub <noreply@github.com>
Sat, 22 Aug 2020 19:15:29 +0000 (16:15 -0300)
(cherry picked from commit 802726acf6048338394a6a4750835c2cdd6a947b)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
Doc/library/functions.rst

index 8cf755a0e6b3809ca94932f24f37e2c91b88465c..c31efa96a92c1fd286602e705af2ff933421f68c 100644 (file)
@@ -1714,6 +1714,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)