On Sat, Feb 22, 2014 at 4:32 AM, Antoine Pitrou <solip...@pitrou.net> wrote:
>> value = (expr except Exception then default)
>
> +0.5
> But I'm aware it requires reserving "then" as a keyword, which might
> need a prior SyntaxWarning.

There are no instances of "then" used as a name in the Python stdlib,
I already checked. If anyone has a good-sized codebase to check,
you're welcome to use the same analysis script - it's an AST
parser/walker, so it finds actual use as a name, not in a comment or a
string or anything.

https://github.com/Rosuav/ExceptExpr/blob/master/find_except_expr.py

ChrisA
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to