Philippe Martin wrote: (snip) > > l_init really is a boolean parameter and l_value a value that _might_ exist > in a shelve. > > So I just want to have a parameter to a method so if the first value tested > is false (l_init) then the second (l_value) does not get tested ... because > it is the second in the statement and only seems to get evaluated if the > first one is true.
s/seems to get/is/ But this is a really unpythonic way to do things IMHO. Either use a try/except block (probably the most straightforward solution), or, as in Larry's post, test for the existence of 'l_value' in locals(). My 2 cents... -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list