Answer the question
In order to leave comments, you need to log in
Python annotations?
Hello, I'm studying the topic "annotations in Python" and wondered: how often are annotations used in real projects or does no one use it anymore?
Answer the question
In order to leave comments, you need to log in
Serious projects always use it, optionally adding mypy on top. With type annotations, life becomes much easier. This radically facilitates the understanding of the code in the future, its support and, especially, teamwork. Also, annotations make it better to design the project architecture, use interfaces instead of specific implementations (in python, however, this is ABC) and use polymorphism with might and main.
And with the advent of the miracle pydantic, life has become even better. Well, fastapi built on top of it and starlette.
Those who do not use annotations have never developed anything more complicated than an online store in one person and have not supported the project for 2+ years.
Are used. There are projects where this is the basis, fastapi and pydantic
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question