[Python-3000] Using a list for *args (was: Type annotations: annotating generators)

Collin Winter collinw at gmail.com
Sat May 27 22:48:13 CEST 2006


On 5/21/06, Guido van Rossum <guido at python.org> wrote:
> Since **kwds is already a dict (i.e. a mutable container) and since we
> long accept a list for *vargs on the call side, I think it is actually
> more logical to use a list for receiving *args.

I'm working on implementing this change and have a question: a number
of places in the stdlib do some processing on *args, then return the
result (currently a tuple). Changing *args to a list means that these
functions now also return lists.

My question is this: should these functions keep returning tuples or
should they (and their tests and docs) be updated to use lists? The
former introduces extra implementation complexity, while the latter
adds backwards compatibility issues.

Collin Winter


More information about the Python-3000 mailing list