metaclass & __slots__

Holden Caulfield phoebe_1 at att.net
Fri Jul 5 09:52:39 EDT 2002


Alex & John,
 Thanks for good explanations and clarifications. This was just an
exercise to hurt my brain, I guess :)
 But somehow I feel the addition of the "new" style classes and the
"automatic" call of "__new__" and "__init__" is really confusing. The
"__init__" seems redundant, since we actually have a true
"constructor". I guess, what I am trying to say is, with the scarce
documentation (and if you are lazy to browse through the source) it
seems like you need to know the distinction on what to override
(__new__ or __init__) for a class derived from a builtin.

Thanks again
M



More information about the Python-list mailing list