[Python-Dev] PEP 362 Third Revision (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Fri Jun 15 00:24:16 CEST 2012


I like the idea of a kind attribute, I don't like the current names for the possible values.

At the very least, "positional only" needs to be supported to handle nameless parameters in C functions (or those that unpack *args internally)

The level of abbreviation used also seems unnecessary and internally inconsistent.

My proposal: POSITIONAL- positional only NAMED_POSITIONAL - normal parameter VAR_POSITIONAL - *args KEYWORD - keyword only VAR_KEYWORDS - **kwds

-- Sent from my phone, thus the relative brevity :) On Jun 15, 2012 7:07 AM, "Ethan Furman" <ethan at stoneleaf.us> wrote:

Yury Selivanov wrote:

I'll amend the PEP this evening to replace 'isargs', 'iskwargs', and 'iskeywordonly' with a 'kind' attribute, with possible values: 'positional', 'vararg', 'varkw', 'kwonly'.

Parameter class will have four constants, respectively: class Parameter: KINDPOSITIONAL = 'positional' KINDVARARG = 'vararg' KINDVARKW = 'varkw' KINDKWONLY = 'kwonly' 'Parameter.isimplemented' will be renamed to 'Parameter.implemented' Is everybody OK with this? Thoughts? I, for instance, like 'varkwarg' more than 'varkw' (+ it is more consistent with **kwargs) +1 I like these names, and the similarity between 'vararg' and 'varkw'. I would also be happy with 'args' and 'kwargs'. Ethan _______** Python-Dev mailing list Python-Dev at python.org http://mail.python.org/**mailman/listinfo/python-dev<http://mail.python.org/mailman/listinfo/python-dev> Unsubscribe: http://mail.python.org/mailman/options/python-dev/ ncoghlan%40gmail.com<http://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120615/b47ef135/attachment.html>



More information about the Python-Dev mailing list