[Python-Dev] A house upon the sand
Tim 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