A 'Python like' language
Sean Ross
sross at connectmail.carleton.ca
Mon Mar 29 05:51:11 EST 2004
"Mark Hahn" <mark at prothon.org> wrote in message
news:37S9c.58035$cx5.39835 at fed1read04...
> > By the way, did anyone figure out how you give an object
> > multiple prototypes?
>
> It sucks right now:
>
> Proto = Proto1()
> Proto.add_proto(Proto2)
> obj = Proto()
>
> There is a discussion about this whole area on the Prothon list right now.
perhaps:
Proto = Proto1.clone().__bases__ = (Proto2, )
obj = Proto1.clone()
or
Proto = Proto1.clone().include(Proto2) # <- might want to save that for
mixins
obj = Proto1.clone()
or not
More information about the Python-list
mailing list