Show HN: A design-by-contract Python package in ~100 lines

https://github.com/StefanUlbrich/design-by-contract
by stefanka • 4 years ago
58 12 4 years ago

Greetings! A 2.5 weekends project to teach myself newer Python features (>= 3.10). Conditions are written as Lambda expressions that annotate parameters and return types, and coexist with type annotations. Symbols to share values between conditions are also supported to a limited extend.

Related Stories

Loading related stories...

Source preview

github.com