Partial function
Section: Decorators and higher-order functions
Partial function
python
python
from functools import partial
base2 = partial(int, base=2)
value = base2("1010")Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Decorators and higher-order functions