Serhiy Storchaka added the comment:

In any case it doesn't make much sense to change just one separate docstring. 
If you want to avoid misleading and support consistent wording, you should 
examine all occurrences of the word "string" in the documentation, docstrings, 
error messages and comments -- does it mean Unicode string, bytes-like object 
that supports the buffer protocol (including memoryview), bytes-like object 
that supports str-like interface (including bytes, bytearray, but excluding 
memoryview), either Unicode or bytes string? I tried to do this but abandoned 
the work on half-way. This is too large work.

> BTW, what do you think about the second TypeError in ``ord``. Shouldn't it be 
> ValueError?

It could be ValueError. But for compatibility it should stay TypeError. This is 
not wrong if we consider strings of size 1 as separate type.

----------
nosy: +r.david.murray

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27008>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to