Coding style and else statements

Gabriel Genellina gagsl-py at yahoo.com.ar
Wed Aug 30 10:52:07 EDT 2006


At Wednesday 30/8/2006 04:47, Tal Einat wrote:

>I meant to say that:
>
>(thing and [thing+1] or [-1])[0]
>
>is more readable (IMO) than:
>
>thing != -1 and (thing and thing+1 or -1) or 0

Interesting to find how different persons feel "readability" - for 
me, the later is rather clear (but definitively I prefer an if 
statement), and the former simply sucks.


Gabriel Genellina
Softlab SRL 


	
	
		
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas




More information about the Python-list mailing list