[Python-ideas] Slightly changing the signature of the inspect.Parameter constructor

Antony Lee antony.lee at berkeley.edu
Wed Dec 11 01:39:45 CET 2013


It seems to me that POSITIONAL_OR_KEYWORD is the most often used kind of
Parameter (after all, this is the "default" kind of Parameter), so perhaps
the constructor for Parameter could be changed from

def __init__(self, name, kind, *, default=_empty, annotation=_empty,
_partial_kwarg=False):

to

def __init__(self, name, kind=Parameter.POSITIONAL_OR_KEYWORD, *,
default=_empty, annotation=_empty, _partial_kwarg=False):

Any thoughts on that?

Best,
Antony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20131210/14698c92/attachment.html>


More information about the Python-ideas mailing list