scope of function parameters (take two)

Chris Rebert clp2 at rebertia.com
Tue May 31 02:54:09 EDT 2011


On Mon, May 30, 2011 at 11:37 PM, Henry Olders <henry.olders at mcgill.ca> wrote:
> On 2011-05-31, at 1:13 , Wolfgang Rohdewald wrote:
>>
>> what you really seem to want is that a function by default
>> cannot have any side effects (you have a side effect if a
>> function changes things outside of its local scope). But
>> that would be a very different language than python
>
> You're partially right - what I want is a function that is free of side effects back through the parameters passed in the function call. Side effects via globals or print statements is fine by me.

So, you have no problem with *global* side effects, but side effects
with a /more constrained/ scope bother you?
That's kinda odd, IMO.

Cheers,
Chris



More information about the Python-list mailing list