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

Neal Norwitz nnorwitz at gmail.com
Thu Jun 1 06:19:25 CEST 2006


On 5/31/06, Collin Winter <collinw at gmail.com> wrote:
>
> All in all, the tuple->list change was minimally invasive.
>
> Overall, I've chosen to keep the external interfaces of the changed
> modules/packages the same; if there's a desire to change them later,
> this SVN commit can be used to figure out where adjustments should be
> made. Most of the changes involve the test suite, primarily where
> higher-order functions are concerned.
>
> I've submitted a patch to implement this change as SF #1498441
> (http://python.orf/sf/1498441); it's assigned to Guido.

.org that is :-)

Could you run a benchmark before and after this patch?  I'd like to
know speed diff. Something like:

./python.exe -mtimeit 'def foo(*args): pass' 'foo()'
./python.exe -mtimeit 'def foo(*args): pass' 'foo(1)'
./python.exe -mtimeit 'def foo(*args): pass' 'foo(1, 2)'
./python.exe -mtimeit 'def foo(*args): pass' 'foo(1, 2, 3)'
./python.exe -mtimeit 'def foo(*args): pass' 'foo(*range(10))'

You can post the speeds in the patch.

Thanks,
n


More information about the Python-3000 mailing list