Hi,

I implemented the string CEP 108.

http://wiki.cython.org/enhancements/stringliterals

According to the tests, it looks good so far. I'll push the final fixes to
cython-devel as soon as it's back online.

One thing I changed was that you can assign a str literal to both char* and
bytes, i.e.

        cdef char* s = "abc"
        cdef bytes b = "abc"

will both work. I think that makes sense, given that char* and bytes are
mostly equivalent otherwise. This only regards compile-time coerced
literals, so you still cannot assign

        cdef str s = "abc"
        cdef bytes b = s      # ERROR!

which depends on runtime semantics. Also,

        cdef unicode u = "abc"  # ERROR!

is prohibited. You must use a unicode literal here.

Any comments on this change?

Stefan

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to