Message314115
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 and what they would need to add to a class to make it work. This was the typical wording for old-style classes. For example, calling len() on an old-style class without __len__ gave this message, "AttributeError: A instance has no attribute '__len__'".
In addition, we are getting very close to end-of-life for Python2.7. Accordingly, any changes at this point should be limited to things that really matter. It will be too easy to introduce a new problem that we won't have an opportunity to fix later.
I recommend closing this and shifting attention to things that matter. |
|
Date |
User |
Action |
Args |
2018-03-19 19:51:36 | rhettinger | set | recipients:
+ rhettinger, serhiy.storchaka, Anthony Sottile |
2018-03-19 19:51:35 | rhettinger | set | messageid: <1521489095.99.0.467229070634.issue31550@psf.upfronthosting.co.za> |
2018-03-19 19:51:35 | rhettinger | link | issue31550 messages |
2018-03-19 19:51:35 | rhettinger | create | |
|