Author nnorwitz
Recipients
Date 2006-08-23.19:37:28
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
In int_new (Objects/intobject.c), embedded NUL chars
are handled differently.

We should check that the entire string is converted
like PyNumber_Int().  int('5\0') raises an exception. 
int('5\0', 10) returns 5.

>>> int('5\0', 10)
5
>>> int('5\0')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: null byte in argument for int()

The difference is the explicit vs implicit base.
History
Date User Action Args
2007-08-23 14:42:14adminlinkissue1545497 messages
2007-08-23 14:42:14admincreate