diferent answers with isalpha()
gagsl-py2 at yahoo.com.ar
Fri Jul 13 04:23:05 CEST 2007
En Thu, 12 Jul 2007 21:05:42 -0300, <nuno at salgado.ws> escribió:
> I have python with sys.version_info = (2, 4, 4, 'final', 0)
> In Idle when I do print 'á'.isalpha() I get True. When I make and
> execute a script file with the same code I get False.
> Why do I have diferent answers ?
Do you include an encoding directive at the top? (If you omit it you get a
warning in 2.4 and an error in 2.5)
from IDLE and from inside a script. You should get "LATIN SMALL LETTER A
WITH ACUTE"; if not, Python thinks your terminal uses a different encoding
than the actual one.
More information about the Python-list