BartlebyScrivener wrote: > How do you test for a function that returns nothing, and why doesn't > this work? Shouldn't X have to be either None or not? > >>>>x = None >>>> for x in []: > ... if x is None: > ... print "X is None" > ... else: > ... print "X is not None" > ...
No, because you're iterating over an empty list, which does nothing: >>> for x in []: print 'hi' ... >>> -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis The doors of Heaven and Hell are adjacent and identical. -- Nikos Kazantzakis -- http://mail.python.org/mailman/listinfo/python-list