26 Oct
2004
26 Oct
'04
7:04 a.m.
I have two classes: class Person: .... class ZPerson(Person, ZopeClasses....): .... in Person 'n override __gt__, __lt__, and some others.
p1 = Person() p2 = Person() p1.age = 20 p2.age = 30 p2 > p1 True
this doesn't work for the derived Zope class:
p1 = ZPerson() #ok, I create this in the "proper" zope way and #later retrieve it, but you get the idea p2 = ZPerson() p1.age = 20 p2.age = 30 p2 > p1 False p2.__gt__(p1) True
For some reason my __gt__ is not used when using the > operator. If called explicitly, it works properly. Any ideas? Etienne