Robert Bradshaw wrote:
> How to handle strings/unicode, especially in Python 3, has been a
> huge area of debate on the list. However, I'm surprised that str is
> mapped to bytes in Python 3. What was the justification for this, or
> is it just a bug? I think if
>
> def foo():
>      return str, isinstance("abc", str)
>
> have different behavior in Cython and Python that there's a bug
> (unless there's a *very* good reason to do so). I'm not trying to re-
> advocate automatic char* <-> unicode conversions.

Are you sure? What about this:

def foo():
    return  4 / 5

Should this have the same behaviour in Cython and Python regardless of
Python version as well?

I'm with Stefan, a -3 flag which turns on

from __future__ import division, unicode_literals, etc

seems like the right mechanism. Changing semantics based on the Python
version used to compile the C source can't be a good thing.

Dag Sverre

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

Reply via email to