Yes, that's exactly right. It does not affect the callee. Regarding function call performance, nothing has changed for the originally accepted argument lists: the opcodes generated are the same and they are processed in the same way.
Also, regarding calling argument order, not any order is allowed. Regular arguments must precede other kinds of arguments. Keyword arguments must precede **-args. *-args must precede **-args. However, I agree with Antoine that PEP 8 should be updated to suggest that *-args should precede any keyword arguments. It is currently allowed to write f(x=2, *args), which is equivalent to f(*args, x=2). Best, Neil On Mon, Feb 9, 2015 at 7:30 PM, Larry Hastings <la...@hastings.org> wrote: > > > What's an example of a way inspect.signature must change? I thought PEP > 448 added new unpacking shortcuts which (for example) change the *caller* > side of a function call. I didn't realize it impacted the *callee* side > too. > > > */arry* > > On 02/09/2015 03:14 PM, Antoine Pitrou wrote: > > On Tue, 10 Feb 2015 08:43:53 +1000 > Nick Coghlan <ncogh...@gmail.com> <ncogh...@gmail.com> wrote: > > For example, the potential for arcane call arguments suggests the need for > a PEP 8 addition saying "first standalone args, then iterable expansions, > then mapping expansions", even though syntactically any order would now be > permitted at call time. > > There are other concerns: > > - inspect.signature() must be updated to cover the new call > possibilities > > - function call performance must not be crippled by the new > possibilities > > Regards > > Antoine. > > > _______________________________________________ > Python-Dev mailing > listPython-Dev@python.orghttps://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/larry%40hastings.org > > > > _______________________________________________ > 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/mistersheik%40gmail.com > >
_______________________________________________ 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