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/2000-July/007092.html below:

[Python-Dev] map() for methods

[Python-Dev] map() for methods [Python-Dev] map() for methodsTim Peters tim_one@email.msn.com
Sat, 22 Jul 2000 03:30:00 -0400
[Skip Montanaro]
> Don't know about the powers that be, but I don't see how you can
> realistically deprecate string.py until you deprecate map().  My most
> frequent use of map() is the simple
>
>     newlist = map(string.strip, oldlist)
>
> where oldlist is a list of strings.  (Replace "strip" by
> "upper", "lower", etc, depending on your needs.)
>
> As far as I'm aware, there's no clean way to do that with
> string methods.

Sorry if someone pointed this out already (2K+ msgs backed up!):

    newlist = [s.strip() for s in oldlist]

Not that that's a reason to deprecate string.py, but this use of "map" is
not a reason not to deprecate it either.  Ditto for "map".






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