Re: [Cython] [cython-users] Re: Preparing the language level change
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
Re: [Cython] Preparing the language level change
John Ehresman schrieb am 25.09.2018 um 16:27: > 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. It is unicode for them, at least in Py3. In Py2, it's str. Thus the name "str_is_str", it's "str" in both versions. Stefan ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel