mkorpela / overrides

A decorator to automatically detect mismatch when overriding a method
Apache License 2.0
261 stars 32 forks source link

[Question] Python's official lib `typing` implements `@final` and `@override` in 3.12 #126

Closed ParticleG closed 3 weeks ago

ParticleG commented 4 months ago

What's the difference between the official implementation and this lib's? Should I switch to official typing lib or stick to this lib?

mkorpela commented 3 weeks ago

Note that this package is ”the future” 10 years before it happened and also mentioned in the PEP for override https://peps.python.org/pep-0698/#runtime-override-checks-in-python

The package currently when I’m writing this has a pretty large user space and is hanging in the top 500 most downloaded pypi packages list. Large long time usage without changes means stability and reliability.

There are few differences:

ParticleG commented 3 weeks ago

the typing versions do not check the override during module import.

Thanks a lot. Then I'll stick to this library