[issue25770] expose name, args, and kwargs from methodcaller

Joe Jevnik report at bugs.python.org
Wed Dec 2 02:52:37 EST 2015


Joe Jevnik added the comment:

I agree that it is a strange name and I also think that it could be immutable or a copy of the internal dict; however, I think that consistency with existing APIs in the standard library is more important. 'keywords' is still very clear in context and is used in 'functools.partial'. This feature is very similar to 'partial' so I would like to follow the example set there.

I would not mind changing 'partial' to reflect this feedback; but, I imagine that will break people's code and be a harder sell. I would find it frustrating if 'partial' and 'methodcaller' spelled 'keywords' differently or had slightly different behavior when it comes to the keyword argument dictionary. Allowing the mutation is not that unintuitive if you look at the simple python translation I added to the docs.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25770>
_______________________________________


More information about the Python-bugs-list mailing list