Do int.__lt__/__gt__/etc. exist?
Terry Reedy
tjreedy at udel.edu
Wed Sep 7 01:46:07 EDT 2005
"Chris Dutton" <cdutton at gmail.com> wrote in message
news:J6qTe.120678$Hk.14664 at pd7tw1no...
> I'm just curious. I've been trying to demonstrate functional thinking
> in Python, but I can't find these methods for int objects. It would be
> immensely helpful for something like:
>
> filter(4 .__lt__, range(10))
Do dir(int) and you will find that int has .__cmp__ but not the individual
compares (at least in 2.2).
tjr
More information about the Python-list
mailing list