Prothon, metaclasses, Zope [Was: A 'Python like' language]
Greg Ewing
greg at cosc.canterbury.ac.nz
Fri Apr 2 02:32:35 EST 2004
Mark Hahn wrote:
> You don't have to use the obj = proto() technique to create an
object. The
> following code is identical to saying subproto = topproto() except no
> __init__() will be called:
>
> subproto = Object()
> subproto.set_proto(topproto) # switch prototype on the fly
>
> Does this give you the missing piece you need
Yes, it does, I think. Creating the prototype this way
is very similar to what the Python class statement does.
Greg
More information about the Python-list
mailing list