[Patches] two more fix for extended call syntax

Moshe Zadka Moshe Zadka <mzadka@geocities.com>
Thu, 30 Mar 2000 08:07:17 +0200 (IST)

On Wed, 29 Mar 2000, Jeremy Hylton wrote:

> Bug #2: The use of old-style keyword arguments along with **dict 
>    modifies dict, adding entries for each of the explicit keywords.
>    The solution I've taken is to copy the **dict if there are 
>    old-style keyword arguments.  I'm not happy about copying a
>    potentially large dictionary, but the case seems to obscure to
>    optimize.  I also discovered that there was no Python C API call
>    to copy a dictionary, so I added a PyDict_Copy method by stealing
>    the body of dict_copy.

If the *args can be any type implementing the sequence protocol, why
can't the second argument can't be any type implementing the mapping
protocol? And in that case, you'd have to copy it to a dictiionary.
It does make sense to optimize the common f(*args, **kw) case, but
not any other.

Moshe Zadka <mzadka@geocities.com>. 
http://www.linux.org.il -- we put the penguin in .com