while (a=b()) ...

Charles G Waldman cgw at fnal.gov
Thu Apr 29 19:12:12 EDT 1999


Marco Mariani writes:
 > 
 > Which one is more ugly?

Version #1 is exactly 2/3 as ugly as version #2.

"$_" is 887 times more ugly; it looks very non-Pythonic to me.


 > =====
 > 
 > c = curs.fetchone()
 > while c:
 >         print c
 >         c = curs.fetchone()
 > 
 > =====
 > 
 > while 1:
 > 	c = curs.fetchone()
 > 	if c:
 > 		print c
 > 	else:
 > 		break
 > 
 > =====







More information about the Python-list mailing list