Lib/email/*.py are fond of using EMPTYSTRING = '' and within the code: EMPTYSTRING.join(...) instead of just writing: ''.join(...) They should just do the latter. It'll avoid a name lookup and look less silly to people reading the code. ;)
On May 05, 2012, at 01:25 AM, R. David Murray wrote: >I've always wondered why the code did that. If Barry doesn't have a good >reason for it, I'll refactor it at some point. A long time ago, Tim (IIRC) expressed an opinion that using the variable makes the code more readable. After having seen so much code that uses the string literals over the years, I wholeheartedly agree with that opinion.