[Python-Dev] Updated PEP 362 (Function Signature Object)
Larry Hastings
larry at hastings.org
Sun Jun 10 21:57:00 CEST 2012
On 06/10/2012 10:59 AM, Benjamin Peterson wrote:
> 2012/6/5 Brett Cannon<brett at python.org>:
>> * is_keyword_only : bool
>> True if the parameter is keyword-only, else False.
>> * is_args : bool
>> True if the parameter accepts variable number of arguments
>> (``\*args``-like), else False.
> How about "vararg" as its named in AST.
Please read the rest of the thread; this has already been discussed.
> Can the "is_" be dropped? It's quite ugly.
I suppose that's in the eye of the beholder:
if parameter.is_kwargs:
reads quite naturally to me.
> Even better, since these are all mutually exclusive,
> they could be cascaded into a single "type" attribute.
Can you make a more concrete suggestion? "type" strikes me as a poor
choice of name, as it makes one think immediately of type(), which is
another, uh, variety of "type".
//arry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120610/f0f174a6/attachment.html>
More information about the Python-Dev
mailing list