[Python-ideas] New 3.x restriction on number of keyword arguments (original) (raw)
Cesare Di Mauro cesare.di.mauro at gmail.com
Fri Oct 22 22:36:49 CEST 2010
- Previous message: [Python-ideas] New 3.x restriction on number of keyword arguments
- Next message: [Python-ideas] New 3.x restriction on number of keyword arguments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2010/10/22 Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl>
2010/10/22 Cesare Di Mauro <cesare.di.mauro at gmail.com>:
> I think that having more than 255 arguments for a function call is a very > rare case for which a workaround (may be passing a tuple/list or a > dictionary) can be a better solution than having to introduce a brand new > opcode to handle it. It does not need a new opcode. The bytecode can create an argument tuple explicitly and pass it like it passes *args. -- Marcin Kowalczyk
It'll be too slow. Current CALL_FUNCTION* uses "packed" ints, not PyLongObject ints.
Having a tuple you need (at least) to extract the PyLongs, and convert them to ints, before using them.
Cesare -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-ideas/attachments/20101022/8d6bc609/attachment.html>
- Previous message: [Python-ideas] New 3.x restriction on number of keyword arguments
- Next message: [Python-ideas] New 3.x restriction on number of keyword arguments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]