python not returning true

Ben Finney bignose+hates-spam at benfinney.id.au
Wed Feb 14 00:36:13 EST 2007


"agent-s" <shanekwon at gmail.com> writes:

> I have a function, generally described as so:
>
> def function(args):
>     if condition:
>         if condition2:
>             function(args+1)
>         elif condition3:
>             print "text"
>             return True
>         else:
>             return False

You've simplified this, presumably to make the code more
clear. Unfortunately what remains isn't executable, so we can't see
the behaviour that confuses you.

Please write a minimal example that demonstrates the behaviour you
want explained.

-- 
 \                      "I doubt, therefore I might be."  -- Anonymous |
  `\                                                                   |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list