[Python-ideas] except expression
Ron Adam
ron3200 at gmail.com
Thu Feb 20 18:39:40 CET 2014
On 02/20/2014 11:31 AM, Ron Adam wrote:
>
> I don't think this would be hard to implement in byte code. The "&"
> operation is just executing the two instructions in sequence. The "|", is
> a standard exception block. The "!" is a raise exception after the
> expression. The rest is just were to put those in relation to each other,
> which is handled by the AST. Nothing very special or difficult to
> implement. Getting the syntax right is the only tricky part, and that may
> only be because I don't have much experience doing that.
The '!' may be a bit more than that if it's also suppresses an exception...
(except exc try ! e1 & e2) # same as '|' ?
Maybe it's not needed.
Cheers,
Ron
More information about the Python-ideas
mailing list