On 03/07/2020 00:12, Nick Coghlan
I don't think it looks at all weird in this example, I think it
reads quite naturally, in my brain at least.
IMHO, the assignment statement should remain as it is, not
assign and sometimes not.
There could be another form that does matching:
try ?x, 0 = (4,5)
Huh, this made me wonder if "match/try" may fit
people's brains better than "match/case". I know for me that I
want to read case clauses the same way I would read them in C,
which is thoroughly unhelpful.
The following looks weird though, so I don't
think I actually like it in practice:
try Point(x, y):
try Rectangle(x0, y0, x1, y1, painted=True):
It is maybe not quite so good when comparing with actual values:
And it has the virtue of adding one less keyword.
Python-Dev mailing list -- email@example.com
To unsubscribe send an email to firstname.lastname@example.org
Message archived at https://email@example.com/message/H6ZNPMH5T5PY265DGSL7OMSZZH4UDJSJ/
Code of Conduct: http://python.org/psf/codeofconduct/