Author serhiy.storchaka
Recipients larry, serhiy.storchaka, taleinat
Date 2015-03-25.08:25:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427271928.64.0.665277905014.issue20181@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2015-03-25 08:25:28serhiy.storchakasetrecipients: + serhiy.storchaka, taleinat, larry
2015-03-25 08:25:28serhiy.storchakasetmessageid: <1427271928.64.0.665277905014.issue20181@psf.upfronthosting.co.za>
2015-03-25 08:25:28serhiy.storchakalinkissue20181 messages
2015-03-25 08:25:28serhiy.storchakacreate