Jukka Lehtosalo

Results 148 issues of Jukka Lehtosalo

This seems to be a somewhat common `zip` idiom: ```py >>> a = [('a', 1), ('b', 2), ('c', 3)] >>> list(zip(*a)) [('a', 'b', 'c'), (1, 2, 3)] ``` The inferred...

feature
priority-1-normal
topic-plugins
topic-calls

Modules can implement protocols, so `type(x)` is not necessarily a type object if `x` has a protocol type. ```py from typing import Protocol class P(Protocol): def f(self) -> None: ......

bug
topic-protocols

This code tries to import `TypeAlias` from `typing` if possible and falls back to `typing_extensions` if it isn't available (e.g. on Python 3.8): ```py try: from typing import TypeAlias #...

feature

**Feature** Generate an error if a type from the stdlib `numbers` module is used in an annotation. Use a dedicated error code so that the error can be easily enabled...

feature
needs discussion

This are defined in the PEP 484 draft.

feature
topic-pep-484
priority-1-normal
false-positive
topic-runtime-semantics

Python 3.12 added support for immortal objects (https://github.com/python/cpython/pull/19474). These add immortality checks to incref/decref operations, which add some overhead. Some programs don't get any advantage from immortal objects, and these...

speed

[PEP 703](https://peps.python.org/pep-0703/) (Making the Global Interpreter Lock Optional in CPython) was accepted in Oct 2023. Mypyc will require various changes to support CPython builds that don't use the GIL. We...

feature
area-free-threading

Right now there is no particularly fast way to construct a `str` or `bytes` object from component items, such as code points or characters. Using a list + `join()`, or...

priority-0-high
speed
feature

Right now accessing individual items of `str` or `bytes` objects is not very efficient. One way to make this faster would be to support primitive types that allow direct access...

speed

Currently nested functions are always heap-allocated, even if they are trivial (#712 contains ideas about how to improve this). A simple improvement would be to use a dedicated per-type freelist...

speed
area-functions