How to check something is in a list with rich-comparison objects?

Jason jason.heeris at gmail.com
Tue Sep 15 10:18:33 EDT 2009


Comparing a string to the enumerations in pysvn gives me an attribute
error, because they've overloaded the rich compare methods:
>>> import pysvn
>>> "string" in [pysvn.wc_notify_action.status_completed, "string"]
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
AttributeError: expecting wc_notify_action object for rich compare
Is there a simple way around this?
Thanks,
Jason Heeris


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /