'def' vs 'lambda' vs 'partial' for Partial Function Wrappers in Python

preview_player
Показать описание
Explains the benefits and draw backs for Python's three main ways of creating a function which fixes some values of another function yet leaves others available as inputs.

1:25 - Motivating Example
2:00 - "def" and it's simpler syntax, lambda
3:55 - Why def and lambda are dangerous
5:55 - Partial is less dangerous
9:30 - Summary

Useful links:
Рекомендации по теме
Комментарии
Автор

If variables might be measured in your program, i would wrap partial and add a call to deepcopy for the parameters

julians.
join shbcf.ru