syntax question - if 1:print 'a';else:print 'b'
Steve Holden
steve at holdenweb.com
Thu Oct 27 15:22:47 EDT 2005
Carsten Haese wrote:
> On Thu, 2005-10-27 at 14:00, Gregory Piñero wrote:
>
>>Not quite because if something(3) fails, I still want something(4) to
>>run.
>
>
> def something_ignore_exceptions(x):
> try: something(x)
> except: pass
>
> something_ignore_exceptions(1)
> something_ignore_exceptions(2)
> # etc...
Then the obvious extension:
for i in range(20):
...
but I get the idea that Gregory was thinking of different statements
rather than calls to the same function with different arguments.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
More information about the Python-list
mailing list