A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-November/130030.html below:

[Python-Dev] "PyObject *module" for module-level functions?

[Python-Dev] "PyObject *module" for module-level functions?Stefan Behnel stefan_ml at behnel.de
Tue Nov 5 08:18:09 CET 2013
Larry Hastings, 04.11.2013 23:47:
> When Clinic generates a function, it knows what kind of callable it
> represents, and it names the first argument (the "PyObject *") accordingly:
> 
>  * module-level function ("self"),
>  * method ("self"),
>  * class method ("cls"), or
>  * class static ("null").
> 
> I now boldly propose that for the first one, the module-level function, the
> PyObject * parameter should be named "module".  The object passed in is the
> module object, it's not a "self" in any conventional sense of the word.
> 
> This would enhance readability, as I assert the name "self" there is
> confusing.  The argument is rarely used on module-level functions

Since this only relates to the argument clinic, I assume this change
doesn't get in the way of making module level functions real methods of the
module, does it?

Stefan


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4