
Nov. 27, 2000
8:30 p.m.
[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