After reading a GitHub discussion on the matter
(https://github.com/gvanrossum/patma/issues/93), '|' now makes sense to me
instead of 'or':
- The use of the '|' character in Python seems to be going towards a union-like
operator (dict merging, PEP 604), which is definitely appropriate here.
-
I don't mean to be rude, but I would like to chip in and back up Taine here.
The 'or' operator:
- Already unambiguously associated with a logical OR, which is effectively what
takes place in this circumstance. Using a different symbol to have the same
effect is bound to be confusing to a reasona
> match get_node() into c:
+1 to scoping name pattern related objects upfront. (mirrors my post, so no
bias :P)
Using a namespace to group capture variables is a good idea, though new
attributes are introduced throughout the match block. In my view, this is very
similar to the use a special ch
Hello everyone, this is my first crack at commenting on a PEP, so apologies for
mistaking any developer colloquialisms, or if this is the wrong channel to go
through.
In a nutshell, I was mulling over my initial difficulty in understanding name
patterns and had the thought of ‘declaring’ so-cal