New submission from Mitchell Model:

[ctypes correct component for this?]

The TypeError messages given for incompatible types in comparison operators 
differ from incompatible types in arithmetic operators. The arithmetic operator 
error messages show the names of the types in single quotes, while the 
comparison error messages do not use quotes but follow the name of the type 
with a pair of parens. Seems like these should be analogous.

 class foo(): pass
... 
>>> foo() + 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'foo' and 'int'
>>> foo() < 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unorderable types: foo() < int()

----------
components: ctypes
messages: 206977
nosy: MLModel
priority: normal
severity: normal
status: open
title: Format of TypeError differs between comparison and arithmetic operators
type: behavior
versions: Python 3.3, Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20077>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to