[New-bugs-announce] [issue25210] Special-case NoneType() in do_richcompare()

Ezio Melotti report at bugs.python.org
Tue Sep 22 07:48:47 CEST 2015


New submission from Ezio Melotti:

do_richcompare() has a comment (at Objects/object.c:689) that reads:

/* XXX Special-case None so it doesn't show as NoneType() */

This refers to the following error message:

>>> 3 < None
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unorderable types: int() < NoneType()

This is a common error that comes up while ordering/sorting, and NoneType() is potentially confusing, so I find the request reasonable.
If the consensus is favourable, it should be implemented, if not, the comment should be removed.

----------
components: Interpreter Core
keywords: easy
messages: 251288
nosy: ezio.melotti
priority: low
severity: normal
stage: test needed
status: open
title: Special-case NoneType() in do_richcompare()
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25210>
_______________________________________


More information about the New-bugs-announce mailing list