Terry J. Reedy added the comment:

As I understand it, var(ob) is pretty much a synonym for ob.__dict__. Without 
knowing the internal details, I think vars should do with slots what it would 
do if slots were not used and normal dicts were used. In particular, if a class 
is changed by adding __slots__, vars(class) and vars(instances) should be as 
much the same as possible, at least for read-only uses. This allows iteration 
by keys, values, or items for introspection. That modifying the dict has no 
effect on the object is okay. It is the same for locals() inside a function.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13290>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to