2016-04-14 11:04 GMT+02:00 Nikita Nemkin <nik...@nemkin.ru>: > MAKE_FUNCTION opcode is complex due to the way it receives > input arguments: (...)
Yeah, I was always disturbed how this opcode gets parameters. > My suggestion is to pre-package 1-4 before calling MAKE_FUNCTION, > i.e. explicitly emit BUILD_TUPLE for defaults args and BUILD_MAPs > for keyword defaults and annotations. I read the code. I fact, I don't understand why it wasn't done like that since the beginning :-p > Then, MAKE_FUNCTION will become a dramatically simpler > 5 argument opcode, taking Would you like to work on a patch to implement that change? Since Python 3.6 may get a new bytecode format (wordcode, see the other thread on this mlailing list), I think that it's ok to change MAKE_FUNCTION in the same release. Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com