What's the tidy/elegant way to protect this against null/empty parameters?

Miki Tebeka miki.tebeka at gmail.com
Mon Oct 15 09:33:33 EDT 2012


> I want to fix an error in some code I have installed, ...
Apart from all the reasons why it's bad (see the Python Zen #10). One way to do it is:
    return [i or '' for i in a]



More information about the Python-list mailing list