Jukka Lehtosalo

Results 479 comments of Jukka Lehtosalo

Another way to approach this would be to add primitive types for regular `Sequence` and `Mapping` types that wouldn't have runtime type checking (it could be quite slow due to...

For context, the current benchmarks live in https://github.com/mypyc/mypyc-benchmarks. Having more benchmarks would be useful. Since we want mypyc benchmarks to have full type annotation coverage, adding benchmarks takes some effort,...

At the very least we should generate an error here and suggest using a class-based enum instead.

Mypy has no special understanding of `MethodType`. It's defined as a regular class in typeshed, and mypy assumes that's the whole story. A potential fix would be to special case...

I agree with Guido. It seems that the dividing line will have to be kind of arbitrary. Somewhat related: One potential longer-term workaround to the problem would be to provide...

> Would it be weird to only do this when `--check-untyped-defs` is true? I like this idea!

I'm removing the low priority and 'needs discussion' labels since this seems like a popular enough idea. We'd still need somebody to contribute an implementation. I think that instead of...

I think that somebody proposed making `slice` generic some time a ago, but it was rejected because we didn't have use case.

That sounds reasonable to me, as potentially 90+% of slice objects have integer indices, and it would also be backward compatible.

The proposed semantics seem to be that a final TypedDict object doesn't have any extra keys beyond those included in the definition. Also, a final TypedDict can't be used as...