[issue27008] error message of ord is not intuitive

2016-05-12 Thread R. David Murray
R. David Murray added the comment: All right, we'll close this then. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ __

[issue27008] error message of ord is not intuitive

2016-05-12 Thread Xiang Zhang
Xiang Zhang added the comment: I also notice the document. I get surprised when I see the implementation also supports bytes while the doc says one unicode character. But then I tell myself that maybe unicode character also includes bytes? I am not sure about the English description. But givi

[issue27008] error message of ord is not intuitive

2016-05-12 Thread R. David Murray
R. David Murray added the comment: You are right, if it is too big a job to do it all at once, then we can fix them as we find them. Do you want to propose a patch? However, in this case I think there is arguably not a bug. It looks as though the intent is that ord only support strings (see

[issue27008] error message of ord is not intuitive

2016-05-12 Thread Xiang Zhang
Xiang Zhang added the comment: Ohh, you have tried to do that. It must be a large work. But on the other hand, if this is a too large work, why not solve this case by case? This work is too large to get someone work on it, even you, the most active developer in the community I see have abandon

[issue27008] error message of ord is not intuitive

2016-05-12 Thread Serhiy Storchaka
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 comment

[issue27008] error message of ord is not intuitive

2016-05-12 Thread Xiang Zhang
Xiang Zhang added the comment: BTW, what do you think about the second TypeError in ``ord``. Shouldn't it be ValueError? -- ___ Python tracker ___ __

[issue27008] error message of ord is not intuitive

2016-05-12 Thread Xiang Zhang
Xiang Zhang added the comment: If you think it's OK, it's fine. Please close this thread. -- ___ Python tracker ___ ___ Python-bugs-li

[issue27008] error message of ord is not intuitive

2016-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This not the only place where "string" means unicode string or bytes string. I don't think this is large issue. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue27008] error message of ord is not intuitive

2016-05-12 Thread Xiang Zhang
New submission from Xiang Zhang: The error message of ``ord`` is not that right. It says 'ord() expected string of length 1'. I don't think in Py3.x string can refer to both bytes and unicodes. -- messages: 265376 nosy: xiang.zhang priority: normal severity: normal status: open title: