Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37540195
en ru br
ALT Linux repositórios
S:0.2.0-alt2

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

 Principal   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

A versão atual: 0.2.0-alt2
Data da compilação: 10 novembro 2022, 10:04 ( 76.2 weeks ago )
Tamanho:: 20.34 Kb

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

Licença: BSD-3-Clause
Sumário: Specifications for callback functions passed in to an API
Descrição:

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.

Mantenedor currente: Stanislav Levin

Lista dos contribuidores

Lista dos rpms provida por esta srpm:

  • python3-module-backcall
ACL:
     
    projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
    mantenedor atual: Michael Shigorin
    mantenedor da tradução: Fernando Martini aka fmartini © 2009