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

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

index d0f607296e86c8dce30e386ab4ae6773c4dd7751..b88c56e3d586228c040c5faa4439f4986cb565b9 100644 (file)
@@ -1720,6 +1720,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)