From: cgw at fnal.gov (Charles G Waldman)
Date: Thu, 29 Apr 1999 23:12:12 GMT
Subject: while (a=b()) ...
In-Reply-To: <19990430000141.A5867@shalott>
References: <19990430000141.A5867@shalott>
Message-ID: <14120.59212.758142.722755@buffalo.fnal.gov>
X-UID: 1103                                                  

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
 > 
 > =====







