Prothon, metaclasses, Zope [Was: A 'Python like' language]
Greg Ewing (using news.cis.dfn.de)
ieyf4fu02 at sneakemail.com
Mon Mar 29 20:25:21 EST 2004
Joe Mason wrote:
> In article <95aa1afa.0403280258.41dc5cd9 at posting.google.com>, Michele Simionato wrote:
>
>>Uh? The base class __init__ method is not called when I derive a new
>>class. I want to make the make the check at class level, *before*
>>instantiating.
>
> It is if you call the inherited __init__ method, which you should be
> doing because it probably does important stuff.
But presumably he wants the check done only once, when a subclass
is defined, *not* every time said subclass is instantiated. In
Prothon it appears that both of these end up invoking the same
__init__ method, so there's no way of telling them apart.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list