backcall – Backwards suitable callback APIs


If your code lets different folks provide callback capabilities, it is essential to specify the perform signature you anticipate, and verify that capabilities help that. Adding additional parameters later would break different peoples code except you are cautious. If the callback takes fewer parameters than your prototype, backcall will wrap it in a perform that discards the additional arguments. If the callback expects extra arguments, a TypeError is thrown when it’s registered.


https://github.com/takluyver/backcall


Tags
Implementation

Python

License

Public

Platform

Windows

Linux

   


%d bloggers like this: