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/040075.html below:

[Python-Dev] other "magic strings" issues

[Python-Dev] other "magic strings" issues [Python-Dev] other "magic strings" issuesGuido van Rossum guido at python.org
Fri Nov 7 12:35:26 EST 2003
> > 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?

Hm, I'd forgotten about ascii_letters.  It would make a beautiful
class attribute of str.

I *do* think that we don't need string.letters -- the only use for it
I've seen is checking if a character is in that string, and
c.isletter() is faster.  But if someone has a use case for it that
isn't argued away, I'd be okay with seeing it reincarnated as a class
attribute of str too.

--Guido van Rossum (home page: http://www.python.org/~guido/)

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