[New-bugs-announce] [issue12844] Support more than 255 arguments
Anders Kaseorg
report at bugs.python.org
Fri Aug 26 04:42:58 CEST 2011
New submission from Anders Kaseorg <andersk at mit.edu>:
This feels like an arbitrary restriction (obvious sequences have been replaced with ‘…’ to save space in this report):
>>> zip([0], [1], [2], …, [1999])
File "<stdin>", line 1
SyntaxError: more than 255 arguments
especially when this works:
>>> zip(*[[0], [1], [2], …, [1999]])
[(0, 1, 2, …, 1999)]
Apparently that limit bites some people:
https://docs.djangoproject.com/en/1.3/topics/http/urls/#module-django.conf.urls.defaults
The bytecode format doesn’t support directly calling a function with more than 255 arguments. But, it should still be pretty easy to compile such function calls by desugaring
f(arg0, …, arg999, k0=v0, …, k999=v999)
into
f(*(arg0, …, arg999), **{'k0': 'v0', …, 'k999': 'v999'})
----------
components: Interpreter Core
messages: 142995
nosy: andersk
priority: normal
severity: normal
status: open
title: Support more than 255 arguments
type: feature request
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12844>
_______________________________________
More information about the New-bugs-announce
mailing list