
Show HN: Forge – a library for dynaimcally revising function signatures - dfee
https://github.com/dfee/forge
======
dfee
With forge, you can _add_ , _delete_ , or _modify_ individual parameters as
well as _convert_ argument values or _validate_ them.

    
    
        import forge
        
        def sumthree(a, b, c):
            return a + b + c
        
        @forge.compose(
            forge.copy(sumthree),
            forge.modify('c', default=3),
        )
        def sumthree_default(**kwargs):
            return forge.callwith(sumthree, kwargs)
        
        assert forge.repr_callable(sumthree_default) == \
               'sumthree_default(a, b, c=3)'
        
        assert sumthree(1, 2, 3) == \
               sumthree_default(1, 2) == \
               (1 + 2 + 3)
        

Today a major revision (v18.6.0) was released.

