prechelt/typecheck-decorator
View on GitHub ↗ ★ 168 Python
For Python3, e.g. @typecheck add_count(count: int, when: any(datetime, timedelta) = datetime.now)
7 mentions on Hacker News by 2 people: 0 stories, 7 comments · first 2015-01-06 · latest 2017-02-25
20082026
-
…prefix: tc.optional(str)=None ): dest.write(prefix + str(thing) if prefix else str(thing)) [0] - https://github.com/prechelt/typecheck-decorator
comment by OJFord · 2017-02-25 · in Postmodern Error Handling in Python 3.6 -
…is done at compile time. If you are OK with interpreted Python and runtime checking you can use https://github.com/prechelt/typecheck-decorator/
comment by bkeroack · 2015-06-26 · in Show HN: A Python with Hindley-Milner-like type annotations, compiling to C -
…why I use Python 3.x exclusively is for the new function annotations, which allow use of this: https://github.com/prechelt/typecheck-decorator This allows me to write Python in a design-by-contract style with full, rich runtime type…
comment by bkeroack · 2015-05-23 · in PEP 0484 – Type Hints is accepted -
There's also https://github.com/prechelt/typecheck-decorator ...which I prefer stylistically (decorators instead of magic monkey-patching).
comment by bkeroack · 2015-01-06 · in Type hinting for Python -
There's also https://github.com/prechelt/typecheck-decorator ...which I prefer stylistically (decorators instead of magic monkey-patching).
comment by bkeroack · 2015-01-06 · in Type hinting for Python -
There's also https://github.com/prechelt/typecheck-decorator ...which I prefer stylistically (decorators instead of magic monkey-patching).
comment by bkeroack · 2015-01-06 · in Type hinting for Python -
There's also https://github.com/prechelt/typecheck-decorator ...which I prefer stylistically (decorators instead of magic monkey-patching).
comment by bkeroack · 2015-01-06 · in Type hinting for Python