This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nascheme
Recipients
Date 2003-01-16.21:33:23
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2007-08-23 14:09:33adminlinkissue660144 messages
2007-08-23 14:09:33admincreate