From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 22 Aug 2020 19:15:29 +0000 (-0700) Subject: Document vars behavior when __dict__ is missing (GH-21466) (GH-21941) X-Git-Tag: v3.8.6rc1~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08045391a7aa87d4fbd3e8ef4c852c2fa4e81a8a;p=thirdparty%2FPython%2Fcpython.git Document vars behavior when __dict__ is missing (GH-21466) (GH-21941) (cherry picked from commit 802726acf6048338394a6a4750835c2cdd6a947b) Co-authored-by: Andre Delfino --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 8cf755a0e6b3..c31efa96a92c 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)