From a86533fc89128c4aa6a8d5cfb60215a86655aafe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Mon, 13 Jul 2020 15:40:38 -0300 Subject: [PATCH] Document vars behavior when __dict__ is missing --- Doc/library/functions.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 3c36b59befab91..28fccc8f85e751 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1733,6 +1733,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)