Message76947
The analysis is good, but there are two problems with your patch:
- it crashes in debug mode, because a Py_INCREF(step) is missing in
validate_step() (A comment above says: "Always returns a new reference")
- it does not work with
>>> class Index:
... def __index__(self):
... return 42
...
>>> list(range(0, 100, Index()))
TypeError: unsupported operand type(s) for //: 'int' and 'Index'
In short: PyNumber_Index is not an unnecessary call!
But this does not invalidate the other parts of the patch. Would you try again? |
|
Date |
User |
Action |
Args |
2008-12-04 23:58:13 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, laszlo |
2008-12-04 23:58:13 | amaury.forgeotdarc | set | messageid: <1228435093.07.0.510644011671.issue4536@psf.upfronthosting.co.za> |
2008-12-04 23:58:12 | amaury.forgeotdarc | link | issue4536 messages |
2008-12-04 23:58:11 | amaury.forgeotdarc | create | |
|