[Python-Dev] Re: Re: lists v. tuples (original) (raw)
Raymond Hettinger python@rcn.com
Sun, 16 Mar 2003 16:59:56 -0500
- Previous message: [Python-Dev] Re: Re: lists v. tuples
- Next message: [Python-Dev] Re: Re: lists v. tuples
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
one minor problem with the six lt etc is that they should be all defined. For quick things (although I know better) I still define just cmp out of laziness.
Sometime back, I proposed a mixin for this.
class C(CompareMixin): def eq(self, other): ... def lt(self, other): ...
The eq by itself is enough to get ne defined for you. Defining both eq and lt gets you all the rest.
Raymond Hettinger
################################################################# ################################################################# ################################################################# ##### ##### ##### ################################################################# ################################################################# #################################################################
- Previous message: [Python-Dev] Re: Re: lists v. tuples
- Next message: [Python-Dev] Re: Re: lists v. tuples
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]