On Fri, Mar 12, 2010 at 5:11 PM, Enlightenment SVN <[email protected]> wrote: > Log: > None means none, dammit. > - if x != "": > + if x != "" and x != None:
it is common Python guideline to compare with None using "is" or "is not". This is slightly faster as it is a pointer comparison instead of calling equality method. More over, what you did is just the same as: if x: no? Example: >>> x = "a" >>> x != "" and x != None True >>> bool(x) True >>> x = "" >>> x != "" and x != None False >>> bool(x) False it is more usual to just use "if x" in this case. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
