One of the Python Zen rules is Explicit is better implicit. And yet
it's ok to do:

if x:
   do_sth

when x is string or list. Since it's very comfy, I've got nothing
against though. I am just curious, why is it so?

And one more thing: is it ok to do

if x:

instead of

if x is not None:

Because I often encounter it and would like to know, if I can simplify
it. Especially that I liked similar construction in C/C++.

-- 
Filip Gruszczyński
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to