[Python-Dev] Allowing Unicode literals even without Unicode support?

M.-A. Lemburg mal@lemburg.com
Mon, 27 May 2002 10:39:01 +0200


Guido van Rossum wrote:
> Many test modules fail because they use Unicode literals.  It's easy
> enough to skip Unicode-related tests (just test for the existence of
> 'unicode'), but it's hard to avoid having Unicode literals in the text
> at all.  Should we perhaps silently interpret Unicode literals as
> regular string literals when compiling without Unicode support?

That would be like silently truncating floats to integers. It works
as long as x == int(x), but doesn't for fractional values.

-0 if you make sure that the literal is plain ASCII.
-1 if you don't.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/