kislyuk/ensure
View on GitHub ↗ ★ 157 Python
Validate conditions, Python style.
13 mentions on Hacker News by 2 people: 1 story, 12 comments · first 2013-11-04 · latest 2017-11-05
20082026
-
unittest with https://github.com/kislyuk/ensure
comment by ak217 · 2017-11-05 · in Ask HN: What is your preferred Python 3 testing framework? -
Fine, but it's just an import away: https://github.com/kislyuk/ensure (written by HN user ak217)
comment by icebraining · 2017-10-25 · in Why Python is Slow: Looking Under the Hood (2014) -
Thanks for the link. I developed the annotation+decorator-based type checker in https://github.com/kislyuk/ensure before I saw typecheck-decorator (which looks like it has some cool features). One thing I'm proud of with ensure's…
comment by ak217 · 2015-05-23 · in PEP 0484 – Type Hints is accepted -
My contribution is https://github.com/kislyuk/ensure It's fast and doesn't monkey-patch things.
comment by ak217 · 2015-01-06 · in Type hinting for Python -
Related: https://github.com/kislyuk/ensure A (relatively) high performance runtime annotation type checker. from ensure import ensure_annotations @ensure_annotations def f(x: int, y: float) -> float: return x+y
comment by ak217 · 2014-12-20 · in Guido van Rossum: The Theory of Type Hinting for Python 3.5 -
…library to do optional type checking at runtime with no need for a special interpreter :) https://github.com/kislyuk/ensure (Having optional static type checks in the core interpreter would be nice, though Alex Gaynor's concerns linked in…
comment by ak217 · 2014-08-18 · in Mypy – static type checking for Python 3 -
…) and things they enable like optional runtime type checking ( https://github.com/kislyuk/ensure#enforcing-function-annotat... ). Also, as a library developer, I wanted to highlight some facts from experience with Python
comment by ak217 · 2014-06-29 · in Python 3 Features -
…there on how to do optional runtime type checking in a Pythonic way. My contribution is ensure ( https://github.com/kislyuk/ensure ), for example check out the ensure_annotations decorator ( https://ensure.readthedocs.org/en/latest/#ensure.…
comment by ak217 · 2014-06-07 · in PyParallel: How we removed the GIL and exploited all cores -
…added optional type checking based on function annotations and decorators to the Ensure library: https://github.com/kislyuk/ensure#enforcing-function-annotat... . @ensure_annotations def f(x: int, y: float) -> float: return x+y f(1, 2.3)…
comment by ak217 · 2014-05-19 · in Type checking in Python -
I've added a type checking decorator for function annotations to my assertions helper library, https://github.com/kislyuk/ensure : from ensure import ensure_annotations @ensure_annotations def f(x: int, y: float) -> float: return x+y f(1,…
comment by ak217 · 2014-05-12 · in PEP 3107 – Function Annotations in Python 3 -
I wrote a library so you don't have to use this: https://github.com/kislyuk/ensure (Though I know how frustrating exception juggling can get... especially when they get pickled and re-raised)
comment by ak217 · 2013-12-06 · in FuckIt.py - The Python Error Steamroller -
…utility and expressiveness of Python assertions, so I wrote a library for expressive assertions: https://github.com/kislyuk/ensure It's inspired by ensure.js, and defines a large (and growing) number of helpers to make assertions concise,…
comment by ak217 · 2013-11-18 · in When to use assert -
▲ 1
Ensure: Literate assertions in Pythonstory by ak217 · 2013-11-04 · 0 comments