Before, I briefly mentioned the idea if this could be unified with
except/with's "as". To the casual observer, they're really similar.

However, their semantics would be totally different, and people don't
seem to like a unification attempt.

A huge argument against "as" would be to prevent confusion, especially
for new people.

I must admit I like putting the expression first, though. Even if it's
just to make it harder to mix it up with normal assignment. Perhaps =>
could be used - it's a new token, unlike -> which is used to annotate
return values, it's not legal syntax now(so no backwards compatibility
issues), and used a for similar purposes in for example php when
declaring associative arrays.($arr = array("key"=>"value");). I'm not
convinced myself, though.
Python-ideas mailing list
Code of Conduct:

Reply via email to