Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>
> On Fri, 5 May 2006 08:20:02 -0500, Michael Urman <[EMAIL PROTECTED]> wrote:
> >On 5/5/06, Terry Reedy <[EMAIL PROTECTED]> wrote:
> >> At present, Python allows this as a choice.
> >
> >Not always - take a look from another perspective:
> >
> >def make_person(**kwds):
> > name = kwds.pop('name', None)
> > age = kwds.pop('age', None)
> > phone = kwds.pop('phone', None)
> > location = kwds.pop('location', None)
> > ...
> >
> >This already requires the caller to use keywords, but results in
> >horrid introspection based documentation. You know it takes some
> >keywords, but you have no clue what keywords they are. It's as bad as
> >calling help() on many of the C functions in the python stdlib.
> >
> >So what allowing named keyword-only arguments does for us is allows us
> >to document this case. That is an absolute win.
>
> Here you go:
[snip]
Nice work! So, can we add this to the functools module right next to
decorator, and bypass the syntax change?
- Josiah
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com