wrote in news:[EMAIL PROTECTED] in 
comp.lang.python:

>     >>> [] == []
>     True
>     >>> ['-o'] == []
>     False
>     >>> ['-o'] == False
>     False
>     >>>

To test wether something is true use if.
To test wether something is false use if not.

The python values "True" and "False" are for when you need to 
*store* a boolean value (for later testing).

I you want to to see if an arbitry expression would test as true
or false at the interactive prompt use bool():

>>> bool([])
False
>>> bool(['-o'])
True
>>> 

There is *never* any need to write things like:

        expression == True

or:
        expression == False

Once you stop doing this things will become much simpler.

Rob.
-- 
http://www.victim-prime.dsl.pipex.com/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to