On Mon, Nov 4, 2013 at 3:47 PM, Larry Hastings <la...@hastings.org> wrote:
> 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, and very
> little code is converted right now using Clinic anyway.  I therefore assert
> this change would break very little code, and the code that did get broken
> by this change could be fixed as part of the process of converting it to
> Clinic.
>
> But now would be the time to make this change, before doing the big push to
> convert to Clinic.  (A couple of weeks ago would have been even better...!)
>
> +1?  -1?

+1

-eric
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to