On Wed, May 25, 2011 at 12:37 PM, jpe
<reply+i-954759-90be1c778e144f2c17b3665667d3d62b01062...@reply.github.com>
wrote:
> This optimizes startswith / endwith optimization for str.

Cool.

>What's unclear to me is how str will be mapped to either bytes or unicode; I 
>assume at some point cython will have a python3 syntax mode where str is 
>unicode, print is a function, etc (if it doesn't have one already).  Should I 
>be using the type name bytes instead of str?

I'm glad you're thinking about this question, some explanation of the
various string types is at
http://wiki.cython.org/enhancements/stringliterals

Probably the way to do this is have one optimization for bytes, one
for unicode, and then have a third type for str that dispatches to the
one or the other depending on the python version (using #define).

- Robert
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to