Dictless classes

alex23 wuwei23 at gmail.com
Tue Jul 3 07:50:58 CEST 2012


On Jul 3, 3:03 pm, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:
> I don't have a use-case for this. But I have some code which assumes that
> every class will have a __dict__, and I wonder whether that is a safe
> assumption.

Remember the recent thread on using a different implementation for
<object>.__dict__?
https://groups.google.com/group/python-ideas/browse_frm/thread/f15ef3c7b702a1fa

Given it was impossible to have it *not* create a conventional dict
via metaclasses, I would assume that there will always be a .__dict__.



More information about the Python-list mailing list