Florent Xicluna <la...@yahoo.fr> added the comment: The null byte gives UnicodeEncodeError for other conversions too.
Python 3: int('\0'), float('\0'), complex('\0') Python 2: int(u'\0'), long(u'\0'), float(u'\0'), complex(u'0') Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'decimal' codec can't encode character u'\x00' in position 1: invalid decimal Unicode string ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7710> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com