Handling 3 operands in an expression without raising an exception
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri Sep 27 05:26:31 EDT 2013
On Fri, 27 Sep 2013 12:19:53 +0300, Νίκος wrote:
> I'am not sure what you mean though when you say:
>
>> Simply assign the default values BEFORE the try block, and use pass as
>> the except block.
>
> Can you please make it more clear for me?
variable = "default value"
try:
variable = something_that_might_fail()
except SomeException:
pass
--
Steven
More information about the Python-list
mailing list