On Wed, Jun 17, 2015 at 6:04 PM, Ben Finney <ben+pyt...@benfinney.id.au> wrote: > Steven D'Aprano <st...@pearwood.info> writes: > >> The full signature is: >> >> edir([object [, glob=''] [, dunders=True] [, meta=False]]) >> >> All four arguments are optional, and dunders and meta are >> keyword-only. > > The official documentation seems to prefer this style:: > > edit(object, glob='', *, dunders=True, meta=False) > > (I think that's the style, anyway.) > > I like that it gets rid of square brackets; with the notation showing a > default value, that already communicates that a parameter is optional. > > Since the introduction of keyword-only arguments in Python functions, > the question arises of how to communicate this in documentation. > > The lone asterisk showing the separation of keyword-only arguments from > the rest is confusing to me. Not least because it is (if I understand > correctly) invalid syntax to actually have that in Python code.
No, this is valid syntax in Python 3. It means the same thing to the compiler -- the remaining arguments are keyword-only -- that it means in the documentation. -- https://mail.python.org/mailman/listinfo/python-list