homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients r.david.murray, serhiy.storchaka, xiang.zhang
Date 2016年05月12日.12:46:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463057173.43.0.0307428061981.issue27008@psf.upfronthosting.co.za>
In-reply-to
Content
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 the documentation). The fact that it supports bytes-like objects is redudant (ord(b'a') == b'a'[0]). I'd call it a bug that it supports bytes-like objects, but we probably kept (and should keep it) it to make it easier to port python2 code to python3.
So, if any change were to be made here, it would probably be to change the error message if and only if the input is not in fact a string, and perhaps even recommend using the indexing syntax.
On the gripping hand, I've never been a fan of the fact that indexing a byte string gets you an integer :)
History
Date User Action Args
2016年05月12日 12:46:13r.david.murraysetrecipients: + r.david.murray, serhiy.storchaka, xiang.zhang
2016年05月12日 12:46:13r.david.murraysetmessageid: <1463057173.43.0.0307428061981.issue27008@psf.upfronthosting.co.za>
2016年05月12日 12:46:13r.david.murraylinkissue27008 messages
2016年05月12日 12:46:13r.david.murraycreate

AltStyle によって変換されたページ (->オリジナル) /