substitution

Peter Otten __peter__ at web.de
Tue Jan 19 13:58:24 EST 2010


Wyrmskull wrote:

> Your flowing pythonicity (if len(x):) gave me lots of inspiration.

Actually, instead of

if len(pairs): ...

that should have been just

if pairs: ...

When I started writing the function I initially wanted to special-case 
len(pairs) == 1. The len() call is a superfluous leftover.

Peter



More information about the Python-list mailing list