u'a' in string.letters fails: a Python 2.3 bug?

Edward K. Ream edreamleo at charter.net
Fri Oct 10 18:15:28 EDT 2003


> > 1. Is this a bug, or am I missing something?
>
> What you may be missing is that factors including but not limited to
> readline, the way python was invoked, orders of imports, locals
> settings and the phase of the moon may have an effect on whether
> "ordinals not in range(128)" get into string.letters.

Thanks for this info.  I wonder why string.letters remains.  Shouldn't it be
deprecated?

I've substituted string.ascii_letters for string.letters as a temporary
expedient, and will consider ch.isalpha() for future work.  Thanks again.

Edward
--------------------------------------------------------------------
Edward K. Ream   email:  edreamleo at charter.net
Leo: Literate Editor with Outlines
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------






More information about the Python-list mailing list