4 ms·
I wish they make it possible to use any, callable builtins for type annotations
by tandav 3y ago
I wish they make it possible to use any, callable builtins for type annotations
- kuratkull 3y agoYou can. def foobar(things: list[tuple[int, Floob | None]]) -> dict[int, int]): Possible since 3.11 I think, maybe even 3.10.
- SushiHippie 3y agoYou can use it since 3.7 with `from __future__ import annotations`
- extasia 3y agoI think they mean the literal builtins `any` and `callable` instead of typing.Any and typing.Callable.