try/except KeyError vs "if name in ..."

Manuel Pégourié-Gonnard mpg at elzevir.fr
Sat Oct 6 06:09:35 EDT 2012


Günther Dietrich scripsit :

> Somewhere I read a text regarding 'try:' versus 'if'. If you take the 
> probabitility into consideration, how many times the test will fail or 
> succeed, there are two possibilities: [...]

Ok, thanks for the details!

-- 
Manuel Pégourié-Gonnard - http://people.math.jussieu.fr/~mpg/





More information about the Python-list mailing list