Re: [Python-Dev] cpython: Uniformize argument names of "call" functions
On 29.11.16 19:58, victor.stinner wrote: https://hg.python.org/cpython/rev/7efddbf1aa70 changeset: 105395:7efddbf1aa70 user:Victor Stinner date:Tue Nov 29 18:47:56 2016 +0100 summary: 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. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] cpython: Uniformize argument names of "call" functions
2016-11-30 10:01 GMT+01:00 Serhiy Storchaka : >> 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...) 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(). -- In third party code, I don't recall having seen a variable called "callable" (or they are very rare?). In the stdlib, "func" is much more common than "callable", raw statistics (default branch): $ grep '\' Lib/*.py|wc -l 318 $ grep '\' Lib/*.py|wc -l 115 In CPython C code, "func" is also more common than "callable" (3.5 branch): $ grep '\' */*.c|wc -l 725 $ grep '\' */*.c|wc -l 126 My concern is not to be accurate in the variable name, just to use a convenient, short and common name to *uniformize* the code. Victor ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] cpython: Uniformize argument names of "call" functions
On 30.11.16 11:15, Victor Stinner wrote: 2016-11-30 10:01 GMT+01:00 Serhiy Storchaka : 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. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] cpython: Uniformize argument names of "call" functions
I reverted my change and reposted the change as a patch: http://bugs.python.org/issue28838 Victor ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.7.13 release dates
On Tue, 29 Nov 2016 23:07:14 -0800 Benjamin Peterson wrote: > Okay, now that we're heard from the other side, and I lacking a concrete > reason to delay the release, I'm putting 2.7.13 back at the original > dates. Serhiy may be thinking about https://bugs.python.org/issue28427 Regards Antoine. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.7.13 release dates
On Wed, Nov 30, 2016, at 10:19, Antoine Pitrou wrote: > On Tue, 29 Nov 2016 23:07:14 -0800 > Benjamin Peterson wrote: > > Okay, now that we're heard from the other side, and I lacking a concrete > > reason to delay the release, I'm putting 2.7.13 back at the original > > dates. > > Serhiy may be thinking about https://bugs.python.org/issue28427 But that isn't new, right? ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
