Message10094

Author jeff.allen
Recipients jeff.allen, ztane, zyasoft
Date 2015-06-01.09:05:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1433149528.46.0.918574621048.issue2364@psf.upfronthosting.co.za>
In-reply-to
Content
The docs say it's locale-dependent:
https://docs.python.org/2/library/stdtypes.html#str.isalpha
Jython's locale support is weak, and in our code you can see us fall back on Latin-1, as a rule. However, I agree that on examination CPython seems to have an ascii interpretation hard-wired.

I guess they forgot the docs when dealing with: http://bugs.python.org/issue5793


The policy has been made explicit in Python 3.5 docs:
https://docs.python.org/3.5/library/stdtypes.html#bytearray.isalpha
In Python 3:
>>> '\xc0'.isalpha()
True
>>> b'\xc0'.isalpha()
False
>>> bytearray(b'\xc0').isalpha()
False
>>> (u'\xc0').isalpha()
True

I think consistency with Python 3 is sensible. (Differing views?)
History
Date User Action Args
2015-06-01 09:05:28jeff.allensetmessageid: <1433149528.46.0.918574621048.issue2364@psf.upfronthosting.co.za>
2015-06-01 09:05:28jeff.allensetrecipients: + jeff.allen, zyasoft, ztane
2015-06-01 09:05:28jeff.allenlinkissue2364 messages
2015-06-01 09:05:27jeff.allencreate