Robert Bradshaw wrote:
> I have a draft up at http://wiki.cython.org/enhancements/stringliterals
> please all feel free to add and edit.
Thanks, Robert.
One thing I see missing is how this would be handled:
cdef str s = "some string"
cdef char* cs = s
Should this simply result in a runtime error under Py3?
Or would you forbid this and just raise a Cython compiler error (or
warning), stating that "bytes" should be used instead? Although, this might
actually appear inside of a Py2-only or try-except block, so I guess a
warning would be the most we can do.
BTW, we shouldn't forget to adapt the .pxd files in Cython/Includes
accordingly, so that they return either "bytes" or "unicode", but *never*
"str" (or "object", if we know it's a string type).
And "str", "bytes" and "unicode" wouldn't be assignable to each other,
right? Or would you also leave that to runtime?
Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev