A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-November/040074.html below:

[Python-Dev] other "magic strings" issues

[Python-Dev] other "magic strings" issuesAlex Martelli aleaxit at yahoo.com
Fri Nov 7 12:30:55 EST 2003
On Friday 07 November 2003 06:26 pm, Barry Warsaw wrote:
> On Fri, 2003-11-07 at 12:05, Guido van Rossum wrote:
> > Yes, that would be good.  Is there anything besides maketrans() in the
> > string module worth saving?  (IMO letters and digits etc. are not --
> > you can use s.isletter() etc. for that.)
>
> I'm not following, are you saying we don't need string.ascii_letters and
> friends any more?

I think we do, but I'd rather access them as str.ascii_letters myself.  Or
maybe we could use just letters, lowercase and uppercase as attribute
names, implying the ascii_ -- people needing nonasciis might then still
need to "import string", which in itself might be OK, but... that might be
a bit too confusing overall.

Anyway, I do have code that e.g. does "for c in string.ascii_lowercase: ...", 
and that is not as handily done with just the .islowercase method...


Alex


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4