Hi, Robert Bradshaw wrote: >> cdef char* s = _some_c_call() >> result = s + "abc" > > This would still work using Py2 semantics (unicode -> str is fine as > long as it's ascii).
But it would not work in Py3. And I'm very much against porting Py2 quirks to Cython, just because "it worked in Py2". >> There's no "automatic" way to heal this. People *will* have to >> invest work to >> port their code. > > We can mitigate the pain. If someone writes a module in Cython for > Py2, and then someone wants to use it from Py3, they should just be > able to compile the C source file (not require the original author to > do something special in their Cython source). Sure, the original author is required to make the source ready for Py3 either way. It's very unlikely that this will work out of the box if the author relied on Py2 semantics of byte strings and unicode strings. Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
