[Python-3000] Str v. Unicode in C?

"Martin v. Löwis" martin at v.loewis.de
Wed Aug 22 22:28:09 CEST 2007


skip at pobox.com schrieb:
> If I want to check an object for stringedness in py3k do I use
> PyString_Check or PyUnicode_Check?

In the medium term, you should use PyUnicode_Check. In the short
term, additionally, do PyString_Check as well if you want to
support str8 (your choice). In the long term, it might be that
PyUnicode_Check gets renamed to PyString_Check, provided that
str8 is removed from the code base.

Regards,
Martin


More information about the Python-3000 mailing list