list and implicit continuation may cause bugs in Python programs

Skip Montanaro skip at pobox.com
Tue Jul 17 13:12:35 EDT 2001


    Marcin> But how to rewrite it? I'm not sure if I like this:

    Marcin>   for i in list:
    Marcin>     if cond:
    Marcin>       do_something
    Marcin>     else:
    Marcin>       pass
    Marcin>   else:
    Marcin>     somethingelse

As they say, "explicit is better than implicit".

-- 
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list