Группа :: Development/Python3
Пакет: python3-module-backcall
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Текущая версия: 0.2.0-alt2
Время сборки: 10 ноября 2022, 10:04 ( 75.2 недели назад )
Размер архива: 20.34 Kb
Домашняя страница: https://github.com/takluyver/backcall
Лицензия: BSD-3-Clause
О пакете: Specifications for callback functions passed in to an API
Описание:
Список всех майнтейнеров, принимавших участие
в данной и/или предыдущих сборках пакета: Список rpm-пакетов, предоставляемый данным srpm-пакетом:
ACL:
Время сборки: 10 ноября 2022, 10:04 ( 75.2 недели назад )
Размер архива: 20.34 Kb
Домашняя страница: https://github.com/takluyver/backcall
Лицензия: BSD-3-Clause
О пакете: Specifications for callback functions passed in to an API
Описание:
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.
Текущий майнтейнер: Stanislav Levin 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.
Список всех майнтейнеров, принимавших участие
в данной и/или предыдущих сборках пакета: Список rpm-пакетов, предоставляемый данным srpm-пакетом:
- python3-module-backcall