MOOP/POO help

John Wiegley johnw at gnu.org
Wed Aug 22 00:05:36 CEST 2001


>>>>> On Tue Aug 21, Jeff writes:

> I'm using a virgin MOOP install and then running bootstrap.  I see
> usertypes "User", "Wizard", etc, and note that Wizard is a
> descendant of User.  I want to add a property, "hitpoints" to user.
> So, I use the @set command on $sys.usertypes.User and I have a new
> property when I @ex $sys.usertypes.User.  However, when I @ex
> $sys.usertypes.Wizard, I don't see my new property.

MOOP uses it's own variant of "dynamic properties", which have nothing
to do with Python properties, so your request may not find the best
answer here.

MOOP supports both class inheritance (regular Python properties) and
object inheritance (dynamic properties).  You will want to keep that
in mind as you debug your problem.

In general, though, I'd say that working on MOOP is a good way to
understand object internals, but not the best way to understand the
Python language itself.

John



More information about the Python-list mailing list