Metaclass' __init__ Does not Initialize

Michele Simionato mis6 at pitt.edu
Thu Nov 13 08:41:19 EST 2003


"achan" <anabell at sh163.net> wrote in message news:<mailman.700.1068714574.702.python-list at python.org>...
> And for those who are puzzled why I insist on using __slots__, I'm using it
> to reduce errors and not for saving space, wink!

To reduce errors ?? It is possible that you want to forbid
overriding attributes by using __slots__: this is exactly the WRONG
way to use __slots__. See this thread (Classes in Python) for a 
discussion and a solution without using __slots__:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=2259b0e2.0304181308.316737a4%40posting.google.com&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DISO-8859-1%26q%3Dsimionato%2Bfrozen%26btnG%3DGoogle%2BSearch

If I misunderstood you, pardon me; still. that thread make a good
reading for
everybody, so I posted the reference for the sake of other posters too
;)

               Michele Simionato




More information about the Python-list mailing list