This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Change *args from a tuple to list
Type: Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: collinwinter, gvanrossum
Priority: normal Keywords: patch

Created on 2006-05-31 19:30 by collinwinter, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
py3k-args_as_list.patch collinwinter, 2006-05-31 19:30 Change *args to a list, against r46582
Messages (3)
msg50397 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2006-05-31 19:30
As discussed on python-3000, this patch changes *args
from a tuple to a list. It also includes doc and test
changes.

The patch is against r46582.
msg50398 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2006-06-01 19:32
Logged In: YES 
user_id=1344176

As requested by Neal Norwitz, some benchmarking (all times
in usecs per loop):

./python -mtimeit 'def foo(*args): pass' 'foo()'
As tuple: 1.56
As list:  1.7

./python -mtimeit 'def foo(*args): pass' 'foo(1)'
As tuple: 1.75
As list:  2.04

./python -mtimeit 'def foo(*args): pass' 'foo(1, 2)'
As tuple: 1.87
As list:  2.15

./python -mtimeit 'def foo(*args): pass' 'foo(1, 2, 3)'
As tuple: 1.95
As list:  2.3

./python -mtimeit 'def foo(*args): pass' 'foo(1, 2, 3, 4, 5,
6, 7, 8, 9, 10)'
As tuple: 2.67
As list:  2.97
msg50399 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-04-13 00:58
This requires too many changes in user code, eliminates optimization opportunities and generally slows things down. Rejecting.
History
Date User Action Args
2022-04-11 14:56:17adminsetgithub: 43441
2008-01-06 22:29:46adminsetkeywords: - py3k
versions: + Python 3.0
2006-05-31 19:30:33collinwintercreate