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/2002-May/024518.html below:

[Python-Dev] deprecating string module?

[Python-Dev] deprecating string module? [Python-Dev] deprecating string module?Tino Lange tl_news@nexgo.de
Wed, 29 May 2002 14:17:39 +0200
Skip Montanaro wrote:

> It has nothing to do with 11k worth of disk space and everything to do with
> "there's one (best) way to do it".

Hi!

String method's are really nice! (By the way: I miss a length() method)
But in some cases the old-school string module yields the more readable code.
So the "one (best) way" is not always the clearest to read and understand.

I cannot see/understand why it's the "best" way to write for example

fromaddr = " ".join(map(lambda x: x[0] ,
         email.Header.decode_header(fromaddr[1])))

with this (IMHO not intuitive empty string " ") instead of

fromaddr = string.join(map(lambda x: x[0] ,
         email.Header.decode_header(fromaddr[1])))

It's much cleaner to read and understand with string instead of " " - at least 
for beginners, or?

Tino




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