operator
https://docs.python.org/3/library/operator.html
Table of Contents
operator.methodcaller(name[, args...])
reference
- With
f = methodcaller('name')
,f(b)
is equivalent tob.name()
. - With
f = methodcaller('name', 'foo', bar=1)
,f(b)
is equivalent tob.name('foo', bar=1)
.