How to determine what called __cmp__ method?
effbot at telia.com
Sat Oct 21 12:16:06 CEST 2000
Erik Max Francis wrote:
> Pearu Peterson wrote:
> > The question is how to determine inside __cmp__ method where it was
> > called? That is I want to know was it called for evaluating
> > either inequality '<', or '>', or '<=', or ...?
> Why would you need to do that? The purpose of the __cmp__ method is to
> avoid such issues. I submit that if you _really_ need to know which
> operation was being requested, there's something wrong with either your
> algorithm, your design, or both.
bzzt. try again.
More information about the Python-list