Guido van Rossum

Results 724 comments of Guido van Rossum

> I understand that you can't cover every decision, but an overview which documents some of the key decisions would be very valuable, IMO. We thought we did a decent...

Yeah, I has something like this (an isinstance check based on the type of the literal) in an earlier version, but there were too many surprising corner cases. To start,...

Let’s add this to the next revision of the PEP, once the SC has sent us their feedback (expected this week).

I'm beginning to think that Rust was right after all to disallow floats in patterns altogether. This made it into the PEP's Rejected ideas section, and I don't think it...

> For True and False however I think special casing is warranted Yes. Also for None. These are all final types BTW. And I'd say *only* for these three we...

> > If we were to change the semantics of `case True`, would that mean we'd also change the semantics of `case x.y` if `x.y` happens to be the constant...

I am putting this in the revised PEP (PEP 634, https://github.com/python/peps/pull/1598), so I am labeling this as "accepted" and "fully pepped". None, True and False will be compared using `is`...

Indeed, nothing changes for value patterns.

Oh, good eye for detail! Indeed, that totally didn't get rephrased when we changed how True/False/None are matched. Given how dict key lookup works, ``` match {1: "foo"}: case {True:...

Ellipsis is not a reserved word in the grammar so it is not special-cased. If you need to match on it, you can do the following to avoid binding a...