Тёмный
No video :(

Memoizing recursive functions: How decorators are more elegant than I imagined 

PyGotham 2019
Подписаться 1,4 тыс.
Просмотров 172
50% 1

Speaker: Abid H. Mujtaba
Calculating the Fibonacci series is a classic example of writing a recursive
function. However, calculating even `fib(50)` will tie up a modern computer
for a couple of minutes. The solution to this problem is memoization, which
decorators make particularly easy.
But how does a top-level decorator access the recursive call within the
function itself?
The answer is both delightfully simple and extremely insightful, exposing
how seemingly simple language design choices can have profound effects on
its usage.

Опубликовано:

 

22 окт 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии    
Далее