Jelle Zijlstra

Results 643 comments of Jelle Zijlstra

I agree that this behavior is confusing, but your proposed change could also lead to confusing behavior: if I pass say a `numpy.float64(1.0)`, I'd probably expect it to match `1.0`,...

> @JelleZijlstra Actually `numpy.float64(1.0)` would match `case 1.0` since `issubclass(numpy.float64, float)` is true. Oops, you're right. However, `issubclass(numpy.int64, int)` is False, so let's pretend I said `numpy.int64(1)` instead (or `numpy.float32(1.0)`,...

You could do it with a guard, something like `case float(x) if math.isnan(x) or math.isinf(x)`.

#96 also discusses this issue.

I agree with @dmoisset; I don't care much what the semantics are, but it should be clearly defined. Python isn't C and we shouldn't have undefined behavior. I suppose in...

It's worth noting that `x, x = 1, 2` is legal, and as far as I can tell it's not been a major problem. flake8 doesn't even lint against it,...

@SaschaSchlemmer that has the same problem I identified above: it's very easy to just write `case DEBUG:` and have a hard-to-detect bug.

Worth noting that even if we do remove loads completely, that doesn't totally take away the potential for bugs: I could easily see myself refactor `case 5:` into `case SOME_CONSTANT:`...

https://arstechnica.com/gadgets/2021/03/hackers-backdoor-php-source-code-after-breaching-internal-git-server/ seems to cover it too. Googling "php github hack" shows a number of articles. Summary: Attackers got into PHP's custom git server and inserted a backdoor; PHP moved their...

No. I'm currently the only maintainer and I'm not planning to work on any new features, just on making sure the library keeps working with new Python versions (#166). I'd...