Message13729
Logged In: YES
user_id=35752
I think the problem is that wrap_intargfunc and
wrap_intintargfunc use PyArg_ParseTuple(args, "i", &i).
This bug also is present in methods like __getitem__:
>>> "Python"[1.2]
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: sequence index must be integer
>>> "Python".__getitem__(1.2)
'y'
I think the right fix is to use explictly only allow only
ints and longs to wrap_intargfunc and friends. If Guido
agrees I will cook up a patch. It seems like we should have
a code for PyParse_Tuple that only allows ints and longs. |
|
Date |
User |
Action |
Args |
2007-08-23 14:09:33 | admin | link | issue660144 messages |
2007-08-23 14:09:33 | admin | create | |
|