Message256576
| Author |
r.david.murray |
| Recipients |
abarnert, abarry, curioswati, r.david.murray, rhettinger |
| Date |
2015年12月17日.04:38:20 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1450327101.53.0.269314951403.issue25864@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
No, the workaround was for duplicating the existing behavior if the fix (raising an error like a normal dict does) broken someone's code. The *only* possibility here is to have a __reversed__ that raises a TypeError.
What is it that makes reversed raise a typeerror on dict here? Not that we can change it at this point, but reversed blindly using len and __getitem__ for user classes but not on dict is rather inconsistent. I suppose the dict TypeError special case catches common mistakes? In which case adding a __reversed__ that raises a TypeError to Mapping seems to make sense for the same reason. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年12月17日 04:38:21 | r.david.murray | set | recipients:
+ r.david.murray, rhettinger, abarnert, abarry, curioswati |
| 2015年12月17日 04:38:21 | r.david.murray | set | messageid: <1450327101.53.0.269314951403.issue25864@psf.upfronthosting.co.za> |
| 2015年12月17日 04:38:21 | r.david.murray | link | issue25864 messages |
| 2015年12月17日 04:38:20 | r.david.murray | create |
|