Is there a way to change the closure of a python function?
Chris Angelico
rosuav at gmail.com
Wed Sep 28 13:44:34 EDT 2016
More information about the Python-list mailing list
Wed Sep 28 13:44:34 EDT 2016
- Previous message (by thread): Is there a way to change the closure of a python function?
- Next message (by thread): Is there a way to change the closure of a python function?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Sep 29, 2016 at 2:33 AM, Steve D'Aprano <steve+python at pearwood.info> wrote: >>>> Procedural programming under another name... >>> >>> Only in the sense that procedural programming is unstructured programming >>> under another name. What is a procedure call but a disguised GOSUB, and >>> what is GOSUB but a pair of GOTOs? >> >> Continuation-passing style is only GOTOs. Instead of returning to the >> caller, procedures pass control to the continuation, together with the >> values that the continuation is expecting from the procedure. >> >> I guess you can think of it as a way to disguise a GOSUB. > > > Really, if you think about it, both functional and procedural programming > are exactly the same as programming in assembly language. Returning a value > from a function pushes that value onto the function call stack, which is > really just a disguised assembly MOV command. http://xkcd.com/435/ Also relevant to this conversation: https://xkcd.com/1270/ ChrisA
- Previous message (by thread): Is there a way to change the closure of a python function?
- Next message (by thread): Is there a way to change the closure of a python function?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list