lambdas vs functions: a bytecode question

Erik Max Francis max at
Sat Dec 18 01:45:29 CET 2004

Fernando Perez wrote:

> Can someone explain to me what the extra two bytecodes at the end of the
> function version (ff) are for?
> This is just curiosity, please note that I am NOT making any arguments pro or
> against lambdas, functions or anything else.

It's returning None.  I would guess that it's a safety net to make sure 
you don't fall of the end of the function without returning anything; 
that is, the code analysis is not in place to see whether it's necessary 
to actually include in the bytecodes or not.

Erik Max Francis && max at &&
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
   Sentimentality is a superstructure covering brutality.
   -- C.G. Jung

More information about the Python-list mailing list