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 vstinner
Recipients ezio.melotti, josh.r, methane, python-dev, serhiy.storchaka, vstinner, xiang.zhang
Date 2016-11-16.10:55:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479293707.42.0.0404583074373.issue28701@psf.upfronthosting.co.za>
In-reply-to
Content
(I reopen the issue to ask my question :-))

+/* Test whether a unicode is equal to ASCII string.  Return 1 if true,
+   0 otherwise.  Return 0 if any argument contains non-ASCII characters.
+   Any error occurs inside will be cleared before return. */

Can you please also document the behaviour if you pass two non-ASCII strings which are equal? I understand that it returns also 0, right?

Maybe the API should be more strict and require right to be ASCII: "right string must be encoded to ASCII". I expect an assertion error or a fatal error if right is non-ASCII when Python is compiled in debug mode.
History
Date User Action Args
2016-11-16 10:55:07vstinnersetrecipients: + vstinner, ezio.melotti, methane, python-dev, serhiy.storchaka, josh.r, xiang.zhang
2016-11-16 10:55:07vstinnersetmessageid: <1479293707.42.0.0404583074373.issue28701@psf.upfronthosting.co.za>
2016-11-16 10:55:07vstinnerlinkissue28701 messages
2016-11-16 10:55:07vstinnercreate