[Python-3000] None in Comparisons
Josiah Carlson
josiah.carlson at gmail.com
Mon Nov 17 23:50:06 CET 2008
On Wed, Nov 12, 2008 at 3:07 AM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> M.-A. Lemburg wrote:
>
>> The difference is that None is a singleton, so the set of all
>> None type instances is {None}. You always have an intuitive total order
>> relation on one element sets: the identity relation.
>
> I don't see this having much practical consequence, though,
> since sorting members of a 1-element set isn't a very
> useful thing to do.
This discussion smells like a re-hashing of the PEP 326 discussion.
While I will (momentarily) lament None's passing as a (more or less)
minimal object in Python, I believe that an explicit maximum and
minimum value are much preferred over None. And as I stated
previously, having a single implementation of the one true maximum or
minimum value is much preferable to everyone writing their own
(especially with respect to potential bugs).
If a max/min value is desired (votes for None comparing smaller are a
vote for a max/min value, just with a specific previously-established
spelling), then a single implementation should exist. But then we get
back into the same discussion that was had before: do we want them,
and if so, what do we call them?
- Josiah
More information about the Python-3000
mailing list