Is there a way to change the closure of a python function?

Random832 random832 at fastmail.com
Wed Sep 28 12:43:48 EDT 2016


On Wed, Sep 28, 2016, at 11:41, Paul Moore wrote:
> What "allows side effects" in languages like Haskell is the fact that the
> runtime behaviour of the language is not defined as "calculating the
> value of the main function" but rather as "making the process that the
> main functon defines as an abstract monad actually happen".

Well, from another point of view, the output (that is, the set of
changes to files, among other things, that is defined by the
monad-thingy) is *part of* the value of the main function. And the state
of the universe prior to running it is part of the input is part of the
arguments.



More information about the Python-list mailing list