Deep vs. shallow copy?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Mar 14 02:59:05 CET 2014


On Fri, 14 Mar 2014 11:22:43 +1100, Chris Angelico wrote:

> Trollbridge: you have to pay a troll to cross.

Heh :-)

But seriously, there is a distinction to be made between returning from a 
sub-routine, and returning from a sub-routine with a return result. There 
may be alternative methods of exiting the sub-routine, e.g. a GOTO or 
COMEFROM that jumps outside of the function. Exceptions are a form of 
safe, limited GOTO: they can only jump out of a function, not into the 
middle of an arbitrary chunk of code, and they clean up the call stack 
when they jump. But these alternative methods are not what people 
consider *returning* from a sub-routine.

Unless they're trolling :-)




-- 
Steven D'Aprano
http://import-that.dreamwidth.org/



More information about the Python-list mailing list