18 Feb
2014
18 Feb
'14
7:16 p.m.
18.02.2014 21:55, Chris Angelico wrote:
Script: https://github.com/Rosuav/ExceptExpr/blob/master/find_except_expr.py Output: https://github.com/Rosuav/ExceptExpr/blob/master/candidates.txt Annotated examples: https://github.com/Rosuav/ExceptExpr/blob/master/examples.py
Excellent! :) One more minor motivating case: q = queue.Queue(maxsize=10) ... item = q.get_nowait() except Full: default (in case of a list you could check its length to avoid catching exception; but Queue's usage cases are typically multi-threading -related so the "check and then get" way is not an option then) Cheers. *j