Serhiy Storchaka added the comment:
The only difference is in error message.
For now:
>>> unicodedata.name(123)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must be str, not int
>>> unicodedata.name('123')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: need a single Unicode character as parameter
Patched:
>>> unicodedata.name(123)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must be a unicode character, not int
>>> unicodedata.name('123')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must be a unicode character, not str
If you think old messages were better, we can change standard error messages
for 'C' format unit. We already changed standard and specialized error messages
in 3.5 and earlier. In 3.4 it looks as:
>>> unicodedata.name(123)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must be str, not int
>>> unicodedata.name('123')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: need a single Unicode character as parameter
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com