Message96601
| Author |
mark.dickinson |
| Recipients |
flox, mark.dickinson, rhettinger |
| Date |
2009年12月19日.12:03:24 |
| SpamBayes Score |
2.1697906e-06 |
| Marked as misclassified |
No |
| Message-id |
<1261224206.82.0.7229089453.issue7532@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Interesting solution! While the patch itself looks fine to me, I'm not
sure I like this solution much. It's fine to use this trick for list or
tuple, but implementing it for all old-style classes at once seems a bit
dangerous.
With this patch, it seems to me that the rule describing exactly what
__getitem__ receives (for an old-style class implementing __getitem__ but
not __getslice__) becomes rather complicated, and can no longer be deduced
from the documentation.
I'd say leave the current behaviour as it is, and remind people that they
should be using new-style classes wherever possible. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年12月19日 12:03:26 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, flox |
| 2009年12月19日 12:03:26 | mark.dickinson | set | messageid: <1261224206.82.0.7229089453.issue7532@psf.upfronthosting.co.za> |
| 2009年12月19日 12:03:25 | mark.dickinson | link | issue7532 messages |
| 2009年12月19日 12:03:24 | mark.dickinson | create |
|