Style question (Poll)

Croepha croepha at gmail.com
Wed Mar 14 21:37:12 CET 2012


Which is preferred:

for value in list:
 if not value is another_value:
   value.do_something()
   break

--or--

if list and not list[0] is another_value:
 list[0].do_something()

Comments are welcome, Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120314/5185b4e0/attachment.html>


More information about the Python-list mailing list