Hi Oscar
Quoting Oscar Benjamin :
On Fri, 19 Feb 2021 at 15:41, Tobias Kohn wrote: [...]
It's not easy now to look back over the history of all of this. My
recollection of the original version of PEP 622 (if that's the right
one...) was that it had an overcomplicated protocol for __match__
Hi Mark,
Quoting Mark Shannon :
Hi Tobias,
[...]
But they are not referenced in PEP 634. I shouldn't have to trawl
the internet to find the rejected ideas section.
https://dl.acm.org/doi/10.1145/3426422.3426983
That paper describes a `__match__` method, which is absent from PEP 634.
Hi Mark,
Quoting Mark Shannon :
[...]
If you had published these "more complicated, powerful protocols",
you might be able to claim that this is a "rehash".
But you didn't.
I would say that these ideas have been quite prominently published:
Hi Oscar,
Quoting Oscar Benjamin :
Yes, thanks Mark. I'm not sure I've fully understood the PEP yet but
I can see some parts that I definitely like. [...]
As I have just noted in my response to Mark, the aspect with the
"deconstructor" (or `__match__` protocol as we called it) is
Hi Mark,
Thank you for your proposal to try and have more precise semantics for
pattern matching. Of course, the proposal primarily introduces a new
and extended protocol for pattern matching, upon which the 'semantics'
is then based. I think it is important to recognise and discuss
trying to catch up with
the discussions here. Can someone tell me what would be the best
place to look at the most recent proposal? Is one of the PEPs up to
date?
On Mon, Nov 16, 2020 at 7:02 PM Tobias Kohn
wrote:
_Hi Mark,
Thank you for your interest and the questions.
1
Hi David and Steve,
There is hardly anything that needs to be added to your comments, of
course. However, I consider these explicitly named attributes in the
class pattern to be one of the most difficult aspects of our pattern
matching proposal, which is something I just want to briefly
Hi Steve,
Thank you very much for your comments here. This is certainly not the
first time I feel that you not only have an excellent insight into a
topic, but also manage to make your points very clearly and
succinctly. Your car example highlights the background of the
proposed
y Python's burden now to embark on adventures to seek out new
worlds, new possibilities and boldly go where no snake has gone
before... :)
Kind regards,
Tobias
(*) And yes, I am fully aware of assembly, purely functional
languages, brainf*, etc.
Quoting Brett Cannon :
On Tue,
Hi Daniel and Mark,
Sorry for being slightly late to the party, but please let me add a
few remarks of my own to the discussion here.
1. MUST HAVE PRECISELY DEFINED SEMANTICS
Yes, there are some aspects that we left open intentionally. Most
prominently the question of how often the
to your
comment alone, as much more a reply to many a message and discussion
that has been posted here over time.
[1] https://docs.microsoft.com/en-us/dotnet/csharp/discards
Quoting Brett Cannon :
On Mon, Nov 16, 2020 at 9:03 AM Tobias Kohn
wrote:
_Hi Mark,
Thank you
Hi Mark,
Thank you for your interest and the questions.
1. This really comes down to how you look at it, or how you define
pattern matching. The issue here is that the concept of pattern
matching has grown into a large and somewhat diverse flock of
interpretations and implementations
Hi Paul,
Thank you for your comments on the DLS'20 paper. I am glad to hear
that it helps paint a clear(er) picture of pattern matching in
Python. However, please let me set the record straight in a few
regards.
First, there is no 'shoehorning' or 'deception' in our pattern
matching
Hi Thomas,
Thank you very much for your carefully worded and thoughtful email. I
feel, however, that many of your concerns are based on an idealised
picture of a future Python language that will never actually
materialise.
As I understand it your main point is that the concept of
Hi Nick and Everyone,
We had actually considered a similar idea (i.e. load sigils) during
the design phase of pattern matching. In the interest of having a
rule that is as simple as possible, we had proposed to use a leading
dot as a universal marker. Tin's example would thus have been
currently on vacation.
Quoting Larry Hastings :
On 7/31/20 12:36 AM, Tobias Kohn wrote:
And since pattern matching is really
a new feature to be introduced to Python, a feature that can
be seen in different lights, there is no 'Python-Programmer
intuition' that would apply in this case
Hi Caleb,
I will only answer to the second part, as the wildcard issue has
been brought up and discussed time and again, and the `np`
analogue is quite a stretch and far-fetched, really.
One thing that stood out a bit to me as I feel to have seen it a
couple of times is the question of
Hi Rob,
You are right: the grammar should probably read `suite` rather
than `block` (i.e. the `pass` is necessary). Thanks for catching
this!
As for the second question, I assume there might be a slight
oversight on your part. The last line in the example replaces the
string `"_"` rather
Kind regards,
Tobias
Quoting Terry Reedy :
On 7/16/2020 9:51 PM, Tobias Kohn wrote:
Hi Everyone,
I feel there are still quite a few misconceptions around concerning
PEP 622 and the new pattern matching feature it proposes. Please
allow me therefore to take another attempt at explain
Hi Koos,
Let me try and address some of the concerns and questions you are
rising. I am replying here to two emails of yours so as to keep
traffic down.
Quoting Koos Zevenhoven :
> (1) Class pattern that does isinstance and nothing else.
If I understand the proposed semantics
Hi Everyone,
I feel there are still quite a few misconceptions around concerning
PEP 622 and the new pattern matching feature it proposes. Please
allow me therefore to take another attempt at explaining the ideas
behind PEP 622 with a different approach. Bear in mind that I
naturally
Hi Mohammad,
In addition to what Rhodri James has already well pointed out, here
are two additional thoughts on this.
At the moment, the keyword `global` is a marker to say that the
respective variable is /modified/ by a function. Your suggestion
would invert that meaning and might
Hi Oscar
On Wed, Jul 15, 2020 at 4:41 PM Oscar Benjamin
wrote:
I've taken a look through PEP 622 and I've been thinking about how
it could be used with sympy.
Thank you very much for taking the time to carefully elaborate an
interesting possible use case. I find this very helpful and a
Hi Mark,
Thank you for your message. I might be able to answer some of the
questions and also address some issues with the underlying assumptions
in your email---after all, we would most certainly want to avoid
discussing and reasoning about straw men, as you yourself have
repeatedly
24 matches
Mail list logo