[Python-checkins] Document vars behavior when __dict__ is missing (#21466)

Andre Delfino webhook-mailer at python.org
Fri Aug 21 18:29:38 EDT 2020


https://github.com/python/cpython/commit/802726acf6048338394a6a4750835c2cdd6a947b
commit: 802726acf6048338394a6a4750835c2cdd6a947b
branch: master
author: Andre Delfino <adelfino at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-08-21T19:29:34-03:00
summary:

Document vars behavior when __dict__ is missing (#21466)

files:
M Doc/library/functions.rst

diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 43c47c1da9434..d381d43d8e99c 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)
 



More information about the Python-checkins mailing list