This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients JBernardo, eric.araujo, maker, rhettinger, sbt, serhiy.storchaka, terry.reedy
Date 2012-10-03.19:02:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349290936.98.0.414642498755.issue13290@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-10-03 19:02:17terry.reedysetrecipients: + terry.reedy, rhettinger, eric.araujo, maker, sbt, JBernardo, serhiy.storchaka
2012-10-03 19:02:16terry.reedysetmessageid: <1349290936.98.0.414642498755.issue13290@psf.upfronthosting.co.za>
2012-10-03 19:02:16terry.reedylinkissue13290 messages
2012-10-03 19:02:16terry.reedycreate