How do I overload 'equals'?

Equis Uno ir4u4 at yahoo.com
Mon Feb 2 13:57:59 EST 2004


ok,

So I can't overload '='.
Fair enough.

How do I create/define an operator for a class of objects?

For example,

I'd like these statements:

aHouse = makeAhouse()
aHouse superAssign myHouse # use the superAssign operator

to fill aHouse with all the objects inside myHouse
and then call an arbitray method:
myHouse.log('aHouse has a copy of your stuff')

Is this possible?

-moi



More information about the Python-list mailing list