Jeremy Henty wrote:
> 
>..
> And how!  I haven't used Python in anger, but I have wrestled with the
> same problem in Perl, generally when I'm assigning to variables from a
> regexp match.  

I don't want to start a Python thread but I want to point out that you
two are talking about something very different. Python will never
interpret a string that "looks like" "0" to 0. There is one and only one
string in Python that is false and it is the empty string. There is
typically no way for "user data" to generate an empty string (how do you
type an empty string!) so it is quite safe to use it as a false value.
Yes, Ruby's way is even more safe. That doesn't necessarily mean it is
better but I won't go into that....
-- 
Take a recipe. Leave a recipe.  
Python Cookbook!  http://www.ActiveState.com/pythoncookbook