On 9/25/18 1:24 AM, Stefan Behnel wrote:
I started off with "unicode_literals=False", and then renamed it because
this name didn't cover the change of "str" to "unicode" (i.e. renaming the
usages of the builtin type internally, so that "str(x)" actually calls
"unicode(x)").

Looks like this bikeshed needs painting, so let's have a quick(!)
discussion or vote.

- should this feature touch the builtin type at all?

- more opinions on the name?

I think the name str_is_str will be confusing to developers who begin with Python 3 because they'll probably assume str is unicode. The name str_is_bytes might be better or maybe unprefixed-string-literals-are-bytes. A bit verbose, but this should be something used with old code that's used with Python 3; newly written code should use b'' literals.

I do wonder how usable this will be in practice because passing a bytes instance to something that expects a unicode instance may lead to problems.

John
_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel

Reply via email to