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

[Python-Dev] A house upon the sand

[Python-Dev] A house upon the sand [Python-Dev] A house upon the sandTim Peters tim.one@home.com
Mon, 27 Nov 2000 15:30:04 -0500
[Barry A. Warsaw]
> ...
> I have noticed that I often define string constants like
>
> SPACE = ' '
> EMPTY = ''
> NL = '\n'
>
> just so I can write code like
>
> NL.join(headers)
> SPACE.join(names)
> EMPTY.join(lines)
> 
> I doubt it's worth it, but maybe having a standard module called
> stringconstants.py with some of the more obvious choices would make
> things better?

-0.  Then I'd expect to see

    from stringconstants import *

at least once, which is at least once too often.  Sick trick:

SPACE, TAB, NL = " \t\n"

sequence-unpacking-is-more-general-than-you-think<wink>-ly y'rs
    - tim




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