[EMAIL PROTECTED] dettagliò:

> > Someone can explain me why?
>
> The list's __contains__ method is very simple

[...]

> So if you define "__lt__" in your object then the type gets a richcmp
> function and your == test implicit in the 'in' search always incurs the
> cost of figuring out that "__eq__" is not defined.

Thank you for the detailed explanation! :)

Do you think I should report this as a performance bug, maybe with the
'wishlist' priority, or I should accept the truth and hope for better
luck next time? ;)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to