25 May
2012
25 May
'12
5:09 a.m.
Nick Coghlan wrote:
I'd personally agree with filter() moving, but "map(str, seq)" still beats "(str(x) for x in seq)" by a substantial margin for me when it comes to quickly and cleanly encapsulating a common idiom such that it is easier both to read *and* write.
filter(None, seq) [obj for obj in seq if obj] I think the version with filter is *much* better than the second. -- Steven