[issue13290] get vars for object with __slots__

Serhiy Storchaka report at bugs.python.org
Wed Oct 3 22:31:37 CEST 2012


Serhiy Storchaka added the comment:

I see a special warning in the documentation:

  Note: The returned dictionary should not be modified: the effects on the corresponding symbol table are undefined. [2]

  [2] In the current implementation, local variable bindings cannot normally be affected this way, but variables retrieved from other scopes (such as modules) can be. This may change.

Therefore it's okay that modifying the returned dict has no effect on the object.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13290>
_______________________________________


More information about the Python-bugs-list mailing list