.bind() in Python
JavaScript:
callback = foo.bind(null, 1)
Python:
from functools import partial
callback = partial(foo, 1)
| reference | pydocs | mdn docs |
JavaScript:
callback = foo.bind(null, 1)
Python:
from functools import partial
callback = partial(foo, 1)
| reference | pydocs | mdn docs |