[issue9574] complex does not parse strings containing decimals
Alexander Belopolsky
report at bugs.python.org
Thu Aug 12 19:36:22 CEST 2010
Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:
I did some experimentation and found some inconsistency between int and complex:
>>> int('\xA11')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa1 in position 0: invalid start byte
but
>>> complex('\xA11')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: complex() arg is a malformed string
The int behavior is probably a bug that should be reported separately.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9574>
_______________________________________
More information about the Python-bugs-list
mailing list