[issue31550] Inconsistent error message for TypeError with subscripting

2018-03-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marked as closed for the reasons listed. Thank you for the suggestion, but we're going to decline. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue31550] Inconsistent error message for TypeError with subscripting

2018-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If the reason of this change was making the error message more consistent with other error messages in classic classes (at the cost of larger dereference with Python 3), it LGTM. --

[issue31550] Inconsistent error message for TypeError with subscripting

2018-03-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: > it's different than python3 (for no good reason?) Python 3 has new style classes which were always different. > main concern here is ease in portability We've long stated that there should never be dependency on the exact

[issue31550] Inconsistent error message for TypeError with subscripting

2018-03-19 Thread Anthony Sottile
Anthony Sottile added the comment: I think the main concern here is ease in portability coupled with the incorrectness of the current message (pointed out in https://bugs.python.org/issue31550#msg302738) For instance it was consistent in 2.7.1, but not later on in the

[issue31550] Inconsistent error message for TypeError with subscripting

2018-03-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would like to leave this as-is. Consistency between error message wording is one of our least important considerations. The __getitem__ message is somewhat useful -- it helps learners know which magic method is being called

[issue31550] Inconsistent error message for TypeError with subscripting

2018-03-19 Thread Anthony Sottile
Anthony Sottile added the comment: I made a new PR which instead *reverts* the python2.7 patch to restore consistency -- ___ Python tracker

[issue31550] Inconsistent error message for TypeError with subscripting

2018-03-19 Thread Anthony Sottile
Change by Anthony Sottile : -- pull_requests: +5909 ___ Python tracker ___ ___

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-24 Thread Anthony Sottile
Anthony Sottile added the comment: Shouldn't you wait for Raymond's arguments before outright closing the PR? -- ___ Python tracker ___

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it should. But let to hear Raymond's arguments. -- ___ Python tracker ___

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-22 Thread Anthony Sottile
Anthony Sottile added the comment: All I'm really looking for is consistency -- should the change to 2.7 be reverted instead? -- ___ Python tracker ___

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure that this is an enhancement. It makes an error message inconsistent with other error messages. >>> class I(int): pass ... >>> I()[0] Traceback (most recent call last): File "", line 1, in TypeError: 'I' object does not support indexing >>>

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-21 Thread Anthony Sottile
Changes by Anthony Sottile : -- keywords: +patch pull_requests: +3679 stage: -> patch review ___ Python tracker ___

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-21 Thread Anthony Sottile
New submission from Anthony Sottile: There's a bit of history I don't understand and couldn't find the appropriate trail for. The original error message from the 2.6 era: $ python2.6 -c 0[0] Traceback (most recent call last): File "", line 1, in TypeError: 'int' object is unsubscriptable