"BartlebyScrivener" <[EMAIL PROTECTED]> writes:

> How do you test for a function that returns nothing,

A function returns a single value (which may be a container for other
values). By default, with no 'return' statement, it returns the None
object.

What is it you're trying to do?

> and why doesn't
> this work? Shouldn't X have to be either None or not?

Yes.

> >>>x = None

Assigns the name 'x' to the None object.

> >>> for x in []:

Iterates over an empty list, which results in zero iterations;
i.e. does nothing.

Have you followed the tutorial through, running and understanding each
example, to get the basics of Python covered?

    <URL:http://docs.python.org/tut/>

-- 
 \         "I was trying to daydream, but my mind kept wandering."  -- |
  `\                                                     Steven Wright |
_o__)                                                                  |
Ben Finney

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to