Are the CALL_FUNCTION_* opcodes ever used?

Fabiano Sidler fabianosidler at gmail.com
Thu Sep 21 20:15:49 EDT 2006


Hi folks!

Studying python byte code I encountered an interesting issue: there is no
matter, which one of the following function calls I compile:

1: func('foo','bar',foo='bar')
2: func('foobar')
3: func(foo='bar')

The compiler always uses the simple CALL_FUNCTION for all of the source
examples above. While this is fine for me (since the labels in Python/ceval.c
for the other 3 opcodes lead to the same code anyway), I'm curious to know
if there is a case where the compiler really uses the CALL_FUNCTION_* opcodes
or if we could silently remove these opcodes without breaking anything?

Greetings,
Fips



More information about the Python-list mailing list