Обложка канала

Библиотека питониста

30207 @pyproglib

Полезные материалы по всему, что может быть полезно питонисту.

Библиотека питониста

4 года назад
Открыть в
Static Typing Python Decorators

Accurately static typing decorators in Python is an icky business. The wrapper function obfuscates type information required to statically determine the types of the parameters and the return values of the wrapped function. Let's write a decorator that registers the decorated functions in a global dictionary during function definition time …

Redowan's Reflections