Jukka Lehtosalo
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...
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: ......
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** 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...
This are defined in the PEP 484 draft.
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...
[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...
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...
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...
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...