Hello,

On Sun, 15 Nov 2020 00:22:01 -0500
Kyle Stanley <aeros...@gmail.com> wrote:

[]

> FWIW, I'd like to add my +1 to usage of "as" for spelling class
> capture patterns. 

If you want to use "as" in spelling of class capture patterns, you
don't need to worry about anything, because PEP634 already allows that:

case Point(x=_ as a, y=_ as b):

(better spelled as:

case Point(x = _ as a, y = _ as b):
)

You need to worry only if:

1. You find that the "as" form is too verbose, and strongly believe that
the same expressive means can be achieved in more concise syntax.
2. If you worry that other people will still write "case Point(x=a,
y=b)" and that will confuse you and/or yet other people.

For p.2, combination of p.1 and switching default syntax to be value
patterns offers an interesting solution. (Solution to force everyone
to write long verbose "as" patterns, or ambiguous "as" patterns, aren't
"interesting" IMHO).


-- 
Best regards,
 Paul                          mailto:pmis...@gmail.com
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/37ZOGLGGBPBHVPWXOPYQFS52BENL4L5H/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to