Message281854
Currently it is not possible to declare a Python function with more than 255 parameters. There were two historical causes of this:
1. Opcodes MAKE_FUNCTION and MAKE_CLOSURE packed the number of default values for positional and keyword parameters in the opcode argument as 8-bit numbers.
2. co_cell2arg was of type "unsigned char *". It's mapped a cell index to an argument index and didn't support arguments with index > 254.
The first limitation is disappeared in 3.6 after changing the format of MAKE_FUNCTION (issue27095). Proposed patch gets rid of the second cause by changing the type of co_cell2arg and removes explicit check in the compiler. |
|
Date |
User |
Action |
Args |
2016-11-28 10:22:53 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, pitrou, giampaolo.rodola, r.david.murray, valorien |
2016-11-28 10:22:52 | serhiy.storchaka | set | messageid: <1480328572.98.0.543341002881.issue18896@psf.upfronthosting.co.za> |
2016-11-28 10:22:52 | serhiy.storchaka | link | issue18896 messages |
2016-11-28 10:22:52 | serhiy.storchaka | create | |
|