Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6712

Re: scope of function parameters (take two)

References <F8395F78-615E-4FBD-B6FC-1D6173EAEA45@mcgill.ca> <F4EAD1ED-563D-4D6E-A50C-68308A9F26B7@mcgill.ca> <201105310713.24842.wolfgang@rohdewald.de> <D6671B7A-C8B1-4235-A50F-31D9F2AD7DD7@mcgill.ca>
Date 2011-05-30 23:54 -0700
Subject Re: scope of function parameters (take two)
From Chris Rebert <clp2@rebertia.com>
Newsgroups comp.lang.python
Message-ID <mailman.2304.1306824852.9059.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, May 30, 2011 at 11:37 PM, Henry Olders <henry.olders@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: scope of function parameters (take two) Chris Rebert <clp2@rebertia.com> - 2011-05-30 23:54 -0700

csiph-web