newbie question: nop statement for try/except
Peter Hansen
peter at engcorp.com
Tue Mar 16 08:24:19 EST 2004
leo wrote:
> hi there
>
> the "try/[except|finally]" construct seems to need the second part "except"
> resp. "finally" due to syntactical reasons.
>
> but in some cases i guess i do not need any statement in the second
> part. but just carrying on without an idented block doesn't work.
>
> so, is there something a no-operation statement?
"pass"
(Without the quotes.)
(Actually, with the quotes would work too, for reasons I'll leave up to
the reader to find out. :-)
-Peter
More information about the Python-list
mailing list