On Thu, Oct 6, 2011 at 10:58 AM, Daniel Drake <d...@laptop.org> wrote:
> "foo is []" is not a valid way of checking if a list is empty > as this code intends. > > "foo" alone as a boolean operator is an equivalent length check, > and also serves as a "is not None" check too. > But try this: foo = 0 if foo: print 'foo is not None'
_______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel