Skip to content

Commit 802726a

Browse files
Document vars behavior when __dict__ is missing (#21466)
1 parent 7173fc8 commit 802726a

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
@@ -1734,6 +1734,9 @@ are always available. They are listed here in alphabetical order.
17341734
locals dictionary is only useful for reads since updates to the locals
17351735
dictionary are ignored.
17361736

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

17381741
.. function:: zip(*iterables, strict=False)
17391742

0 commit comments

Comments
 (0)