Antoine Pitrou wrote:
Le lundi 25 octobre 2010 à 19:44 -0400, Eric Smith a écrit :
On 10/22/2010 6:45 PM, Antoine Pitrou wrote:
On Sat, 23 Oct 2010 00:36:30 +0200 "M.-A. Lemburg"email@example.com wrote:
It may seem strange to have functions, methods or object constructors with more than 255 parameters, but as I said: when using code generators, the generators don't care whether they use 100 or 300 parameters.
Why not make the code generators smarter?
I don't see a way to work around the limitation without starting every single wrapper object's .__init__() with a test routine that checks the parameters in Python - and that's not really feasible since it would kill performance.
You'd also have to move all **kws parameters to locals in order to emulate the normal Python parameter invokation of the method.
Because it makes more sense to fix it in one place than force the burden of coding around an arbitrary limit upon each such code generator.
Sure, but in the absence of anyone providing a patch for CPython, it is still a possible resolution.
Cesare already posted a patch based on using EXTENDED_ARG. Should we reopen that old ticket or create a new one ?