On 4/17/06, Walter Dörwald <[EMAIL PROTECTED]> wrote: > BTW, do we want to allow foo(1, *args1, 2, *args2, 3)? > > And what about foo(bar=17, **kwargs1, baz=23, **kwargs2)?
There's probably not much use for those but at least the first isn't ambiguous so could be allowed if it doesn't complicate the implementation. The second begs the questions about what works if kwargs1 and kwargs2 contain overlapping keys with different values; it's probably best not to allow this and perhaps **kwds should only be allowed as the very last parameter. Since keyword args aren't position-dependent, there's no reason to need a different position. If we did end up allowing multiple **kwds, the code implementing calls should check that they don't overlap with each other or with other keyword args or with named positional args, to be consistent with the current state of affairs, where f(a=1, **{'a':2}) is rejected with a TypeError. (The complexity of all those cross-checks is hopefully enough to dissuade anyone from proposing this. :-) -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com