top | item 26827837

(no title)

shuringai | 4 years ago

I do use and like both fastapi and pydantic but this situiation is something they brought to themselves by adopting experimenral features into their mainline code and sell it as production ready. Python designers are not responsible for time-to-market decisions of other projects. It comes with the "no liability" part of opensource.

discuss

order

travisjungroth|4 years ago

I don’t think calling type hints experimental is accurate. They’ve been in the stable release for 4 years.

wodny|4 years ago

I think this is an oversimplification. Just look at the number and the history of PEPs:

- The Theory of Type Hints - PEP 483

- Annotations - PEP 3107 - 3.0

- Type hints - PEP 484 - 3.5

- Variable annotations - PEP 526 - 3.6

- Postponed evaluation - PEP 563 - 3.7 (3.10)

- Core support - PEP 560 - 3.7

- Distribution - PEP 561 - 3.7

- Data Classes - PEP 557 - 3.7

- Literal types - PEP 586 - 3.8

- TypedDict (limit keys) - PEP 589 - 3.8

- Final qualifier - PEP 591 - 3.8

- Static duck typing - PEP 544 - 3.8

- Flexible annotations - PEP 593 - 3.9

- Type Hinting Generics In Standard Collections - PEP 585 - 3.9

aflag|4 years ago

Thought it has been there for some time, it was added to core Python on a "provisional" basis (it says so in the docs), meaning that they were not bound to keep backwards compatibility with it. In other words, it's an experimental feature.

nerdponx|4 years ago

It's definitely experimental. No other language has an established system like this, although Ruby seems to have acquired one in 3.0. We still aren't close to uncovering all the unsolved problems yet, let alone solving said problems.

boublepop|4 years ago

They appeared in 3.5, and the new pep is from 3.7, which will now be released in 3.10.

This isn’t something sudden especially not to anyone using type annotations.

folkrav|4 years ago

We've had type hints since 3.5 - therefore 2015, so 6 years.