comparing Unicode and string

luc.saffre at gmail.com luc.saffre at gmail.com
Mon Oct 23 05:28:34 EDT 2006


I didn't mean that the *assignment* should raise exception. I mean that
any string constant that cannot be decoded using
sys.getdefaultencoding() should be considered a kind of syntax error.

I agree of course with the argument of backward compatibility, which
means that my suggestion is for Python 3.0, not earlier.

And I admit that my suggestion lacks a solution for Neil Cerutti's use
of non-decodable simple strings. And I admit that there are certainly
more competent people than me to think about this question. I just
wanted to throw my penny into the pond :-)

Luc

Fredrik Lundh wrote:
> luc.saffre at gmail.com wrote:
>
> > Suggestion: shouldn't an error raise already when I try to assign s2?
>
> variables are not typed in Python.  plain assignment will never raise an
> exception.
> 
> </F>




More information about the Python-list mailing list