jpe, 25.05.2011 21:37:
This optimizes startswith / endwith optimization for str. What's unclear to me is how str will be mapped to either bytes or unicode
Should I be using the type name bytes instead of str?
Different things. Robert already pointed you to the Wiki site. Basically, "str" is evaluated at C compile time to become either bytes or unicode, depending on the CPython version it is being compiled against. The same applies to literals. (And believe me, there has gone some work into this behaviour...)
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).
We have both a "-3" command line option and the "language_level=3" compiler directive for that.
Stefan _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel