2 ms·
from __future__ import annotations This will break all the runtime type checking modules (such as typedload, which I wrote).
by LtWorf 3y ago
from __future__ import annotations
This will break all the runtime type checking modules (such as typedload, which I wrote).
- dragonwriter 3y ago> This will break all the runtime type checking modules (such as typedload, which I wrote). Most runtime type checking modules I am aware of support from __future__ import annotations E.g., typeguard, Pydantic, beartype, among others.
- LtWorf 3y agothey "support" it, but many things will break, for the simple reason that there is absolutely no way to resolve certain types at runtime. In fact the main reason why it's a future is because the pydantic people complained that it broke stuff. When I had complained earlier, Guido didn't give 2 shits, although it broke typedload, a library I wrote that is very similar to pydantic, when pydantic didn't exist. So I know what I am saying