From 802726acf6048338394a6a4750835c2cdd6a947b Mon Sep 17 00:00:00 2001 From: Andre Delfino Date: Fri, 21 Aug 2020 19:29:34 -0300 Subject: [PATCH] Document vars behavior when __dict__ is missing (#21466) --- Doc/library/functions.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 43c47c1da943..d381d43d8e99 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) -- 2.47.3