[Python-ideas] Enhancing vars()

Serhiy Storchaka storchaka at gmail.com
Tue Dec 13 17:58:16 EST 2016


On 13.12.16 01:45, Steven D'Aprano wrote:
> One of the lesser-known ones is vars(obj), which should be used in place
> of obj.__dict__.
>
> Unfortunately, vars() is less useful than it might be, since not all
> objects have a __dict__. Some objects have __slots__ instead, or even
> both. That is considered an implementation detail of the object.

http://bugs.python.org/issue13290
http://mail.python.org/pipermail/python-dev/2012-October/122011.html




More information about the Python-ideas mailing list