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

Miss Islington (bot) webhook-mailer at python.org
Sat Aug 22 15:15:36 EDT 2020


https://github.com/python/cpython/commit/08045391a7aa87d4fbd3e8ef4c852c2fa4e81a8a
commit: 08045391a7aa87d4fbd3e8ef4c852c2fa4e81a8a
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-08-22T16:15:29-03:00
summary:

Document vars behavior when __dict__ is missing (GH-21466) (GH-21941)

(cherry picked from commit 802726acf6048338394a6a4750835c2cdd6a947b)

Co-authored-by: Andre Delfino <adelfino at gmail.com>

files:
M Doc/library/functions.rst

diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 8cf755a0e6b38..c31efa96a92c1 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -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)
 



More information about the Python-checkins mailing list