Skip to content

Commit 0804539

Browse files
Document vars behavior when __dict__ is missing (GH-21466) (GH-21941)
(cherry picked from commit 802726a) Co-authored-by: Andre Delfino <adelfino@gmail.com>
1 parent e94d5db commit 0804539

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Doc/library/functions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,6 +1714,9 @@ are always available. They are listed here in alphabetical order.
17141714
locals dictionary is only useful for reads since updates to the locals
17151715
dictionary are ignored.
17161716

1717+
A :exc:`TypeError` exception is raised if an object is specified but
1718+
it doesn't have a :attr:`~object.__dict__` attribute (for example, if
1719+
its class defines the :attr:`~object.__slots__` attribute).
17171720

17181721
.. function:: zip(*iterables)
17191722

0 commit comments

Comments
 (0)