RussBaz/enforce
View on GitHub ↗ ★ 553 Python
Python 3.5+ runtime type checking for integration testing and data validation
5 mentions on Hacker News by 5 people: 0 stories, 5 comments · first 2017-10-29 · latest 2022-04-22
20082026
-
…but just letting you know that this is an explicit decision, not an unwanted shortcoming. [0] https://github.com/RussBaz/enforce [1] https://github.com/agronholm/typeguard [2] https://github.com/microsoft/pyright [3]…
comment by davidatbu · 2022-04-22 · in Python’s “type hints” are a bit of a disappointment to me -
I've been using enforce for this purpose ( https://github.com/RussBaz/enforce ). It provides decorators that enable type checking where wanted. This gives the advantage of migrating existing code to type checking at your own pace at least.…
comment by qquark · 2018-12-19 · in Reasons Python Sucks -
…that was posted on here last week [2] uses MyPy typing as a core part of the framework. [1] https://github.com/RussBaz/enforce [2] https://news.ycombinator.com/item?id=18107818
comment by drcongo · 2018-10-10 · in Python is becoming the world’s most popular programming language -
Didn’t know about the enforce library ( https://github.com/RussBaz/enforce/blob/master/README.md ) — but have been wanting something like this. Thanks for the useful list!
comment by breatheoften · 2018-02-04 · in Migrating to Python 3 with pleasure -
…any of them, enforce [1] looks to also use the same standard type hinting syntax from PEP 484. [1]: https://github.com/RussBaz/enforce
comment by tedmiston · 2017-10-29 · in The Ergonomics of Type Checking (2016)