[Python] filtrare ai margini

Nicola Larosa nico a tekNico.net
Gio 19 Set 2013 09:36:59 CEST


Andrea Ambu wrote:
> Alternativa:
> 
> x = blah()
> x = -67 if x < -67 else min(x, 67)

Questa č la pių leggibile di tutte, cosa piuttosto importante. :-)

-- 
Nicola Larosa - http://www.tekNico.net/

I'll play closed-source games because they're not very harmful, and
it doesn't bother me when I ride an elevator with closed-source
firmware, but I will not - ever, under any circumstances, for any
reason - give Apple my money or my approval so that it can lock more
people into its beautifully-decorated jails. - Eric Raymond, April 2013



Maggiori informazioni sulla lista Python