Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37532577
en ru br
ALT Linux repos
S:0.2.0-alt2

Group :: Development/Python3
RPM: python3-module-backcall

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Current version: 0.2.0-alt2
Build date: 10 november 2022, 10:04 ( 76.1 weeks ago )
Size: 20.34 Kb

Home page:   https://github.com/takluyver/backcall

License: BSD-3-Clause
Summary: Specifications for callback functions passed in to an API
Description:

Specifications for callback functions passed in to an API

If your code lets other people supply callback functions, it's important
to specify the function signature you expect,
and check that functions support that. Adding extra parameters later
would break other peoples code unless you're careful.

backcall provides a way of specifying the callback signature
using a prototype function:

from backcall import callback_prototype

@callback_prototype
def handle_ping(sender, delay=None):
   
   
   pass

def register_ping_handler(callback):
   
   callback = handle_ping.adapt(callback)
   ping_callbacks.append(callback)

If the callback takes fewer parameters than your prototype,
backcall will wrap it in a function that discards the extra arguments.
If the callback expects more arguments,
a TypeError is thrown when it is registered.

For more details, see the docs or the Demo notebook.

Current maintainer: Stanislav Levin

List of contributors

List of rpms provided by this srpm:

  • python3-module-backcall
ACL:
     
    design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
    current maintainer: Michael Shigorin