[Python-Dev] cpython: Uniformize argument names of "call" functions

Serhiy Storchaka storchaka at gmail.com
Wed Nov 30 05:03:53 EST 2016


On 30.11.16 11:15, Victor Stinner wrote:
> 2016-11-30 10:01 GMT+01:00 Serhiy Storchaka <storchaka at gmail.com>:
>>>   Uniformize argument names of "call" functions
>>>
>>> * Callable object: callable, o, callable_object => func
>>> * Object for method calls: o => obj
>>> * Method name: name or nameid => method
>>
>> This change looks wrong to me. "callable" and "callable_object" are better
>> names for functions like PyObject_Call(), since it supports not just
>> functions, but any callables. "name" is appropriate name of the parameter
>> that denotes a method name, not a method object.
>
> (Oh no, I avoided a review to try to avoid bikeshedding...)

Actually it looked as a red flag to me.

> I tried to be consistent between argument names and function names.
> For example, I expect that you have to pass a *function* to
> PyObject_CallFunction(), and that you have to pass a *method* to
> PyObject_CallMethod().

You have to pass a *callable object* to PyObject_CallFunction(), and 
that you have to pass a method *name* to PyObject_CallMethod().

It would be better to roll back the commit. Other changes looks not well 
justified too.

We can start new discussion about uniform names after that.




More information about the Python-Dev mailing list