overloading ==

Quinn Dunkan quinn at hork.ugcs.caltech.edu
Wed Jan 31 21:33:25 EST 2001


On Wed, 31 Jan 2001 16:30:06 -0800, Amritansh Raghav <amritansh at mobilian.com>
wrote:
>can it be done?
>i looked at the operator documentation under Python Runtime Services - but
>didnt find anything to suggest it could be done.

Yes, define __cmp__ or __rcmp__.  See 3.3.1 in the language reference.



More information about the Python-list mailing list