Message281854
| Author |
serhiy.storchaka |
| Recipients |
giampaolo.rodola, pitrou, r.david.murray, rhettinger, serhiy.storchaka, valorien |
| Date |
2016年11月28日.10:22:52 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1480328572.98.0.543341002881.issue18896@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|