[Python-3000] PEP 3102 Open Issues

Talin talin at acm.org
Thu May 4 08:35:50 CEST 2006


Given that this PEP is shorter, there is less to discuss. :)

It seems that most people are in favor of the first part of the
proposal, which is relaxing the restriction that *args must come
after any keyword arguments. There is less agreement on the
proposal to have non-defaulted arguments after the varargs
argument; However, as I stated earlier, this is what falls out
naturally from the algorithm, and restricting it to only allow
defaulted arguments makes the implementation more complex.

The only really contentious issue appears to be the 'naked
star' syntax, that is the use of a '*' argument without a name
to indicate 'no more positional arguments'.

It appears that while Guido likes this syntax, a lot of people seem
dubious about it.

I have to admit that while the reasoning behind the use of the
'*' character is logical, the logic seems a little convoluted. Part of this
is due to the use of negative logic - the absence of something
that would normally be there (i.e. a keyword after the '*') indicates
a restriction on what would normally be allowed (i.e. additional
keyword arguments.)

Looking at the suggestions that people have made, it seems that most
people would find some sort of delimiter or separator character
to be more natural - in other words, replacing the comma after
the last positional argument with some other character. The use
of a separator suggests 'dividing' or 'partitioning' the argument
list into two pieces, which is, I suspect, how most people think
of the problem.

Unfortunately, the supply of delimiters is (de)limited. We've already
been told that semicolon is a show-stopper and colon is already
taken (for argument type attributes). None of the remaining
characters looks particularly 'pretty' in this context, although I
suppose we could get used to them in time.

This, however, is only my interpretation of the discussion; others
may have a difference view.

At this point, I see only a few choices:

1) Drop this portion of the proposal
2) Go with the 'naked star' syntax anyway over the objections, and
explain the rationale in the docs;
3) Come up with a separator character we can agree on
4) Come up with a brilliantly-devised alternative

Thoughts?

-- Talin




More information about the Python-3000 mailing list