Nitpicking - slightly misleading traceback

Alex Martelli aleax at mail.comcast.net
Thu Jan 26 09:48:32 EST 2006


Sybren Stuvel <sybrenUSE at YOURthirdtower.com.imagination> wrote:
   ...
> if data[x][y] > 0 or datadict.has_key(key):
> 
> This might even make things fit on one line again ;-)

Particularly if you code it idiomatically:

if data[x][y] > 0 or key in datadict:


Alex



More information about the Python-list mailing list