comparing dissimilar types?
Martin von Loewis
loewis at informatik.hu-berlin.de
Sun Oct 8 12:59:44 EDT 2000
"Pete Shinners" <pete at visionart.com> writes:
> in reality, i really don't care for the "p==10", and will
> probably remove it. but i really want "p==(10,10)" to work.
> is there any way i can convice python to call my
> coercion/compare routines in this situation?
It's hard to say. Looking and PyObject_Compare, and taking your
description, I'd say it *does* call your coerce routine. If it
doesn't, then your code does something you forgot to mention...
Regards,
Martin
More information about the Python-list
mailing list