[issue2961] Two error messages inconsistent

2008-05-25 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: I don't see a problem here. You may be mislead by the assumption that the error messages are generated by the parser, which they aren't -- they are generated at runtime by the objects you try to add. The two types report their failure to do the

[issue2961] Two error messages inconsistent

2008-05-24 Thread Chester
Chester <[EMAIL PROTECTED]> added the comment: For the case a + 1 I recommend: TypeError: can't concatenate 'str' and 'int' objects And for the case 1 + a I recommend: TypeError: can't concatenate 'int' and 'str' objects Consistency matters! __ Tracker <[EM

[issue2961] Two error messages inconsistent

2008-05-24 Thread Chester
New submission from Chester <[EMAIL PROTECTED]>: Hello, I would like to report that two error messages of the Python parser are not consistent. Please take a look at this: >>> a = "hello" >>> a + 1 Traceback (most recent call last): File "", line 1, in TypeError: cannot concatenate 'str' a