i think we’re talking about different things. you use enforce to mean “validate”, i used it to mean “coerce”. one of the cases was a command line argument parser that consisted of a single decorator, so you could write
and call it with $ myfile.py foo --bar3--baz2.2 and it would print 13.4
another was about creating working protocol buffers from an excel sheet, nested types and enums and oneofs and everything. we used it to parameterize tests of our bluetooth protocol.
i think we’re talking about different things. you use enforce to mean “validate”, i used it to mean “coerce”. one of the cases was a command line argument parser that consisted of a single decorator, so you could write
@command def foo(bar: int, baz: float): print(baz * 2 + bar * 3)
and call it with
$ myfile.py foo --bar 3 --baz 2.2
and it would print 13.4another was about creating working protocol buffers from an excel sheet, nested types and enums and oneofs and everything. we used it to parameterize tests of our bluetooth protocol.