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


Groups > comp.lang.python > #6712

Re: scope of function parameters (take two)

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <chris@rebertia.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:two': 0.07; 'python': 0.08; 'globals': 0.09; 'imo.': 0.09; 'kinda': 0.09; 'received:209.85.160.174': 0.09; 'received:mail- gy0-f174.google.com': 0.09; 'subject:parameters': 0.09; 'pm,': 0.10; 'wrote:': 0.14; '1:13': 0.16; 'odd,': 0.16; 'rohdewald': 0.16; 'subject:function': 0.16; 'wolfgang': 0.16; 'cc:addr:python- list': 0.17; 'mon,': 0.17; 'language': 0.18; 'call.': 0.19; 'cheers,': 0.19; 'header:In-Reply-To:1': 0.21; 'cc:2**0': 0.22; 'fine': 0.22; 'function': 0.25; 'parameters': 0.26; 'message- id:@mail.gmail.com': 0.28; 'problem': 0.28; '(you': 0.29; 'effect': 0.29; 'received:209.85.160': 0.29; 'cc:addr:python.org': 0.30; 'changes': 0.30; 'print': 0.31; 'seem': 0.32; 'things': 0.33; 'chris': 0.34; 'received:google.com': 0.37; 'received:209.85': 0.37; 'bother': 0.37; 'but': 0.38; 'subject:: ': 0.38; 'subject: (': 0.39; 'received:209': 0.39; 'really': 0.40; 'back': 0.63; 'free': 0.63; '30,': 0.84; '11:37': 0.84; 'partially': 0.84; 'sender:addr:chris': 0.84; 'to:none': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:cc:content-type; bh=2iCUvquoS7WmtZ/74pETIU6YnKwBRdpAuYDjkneUnRY=; b=ZFA9LRHMHhLh166gAs7lupRccYQtmjBxd3c7geGLwoGDzlwz6P1tYtLt6tOtS21MEc of+HgpQ8PO348ZZ45lFivI7GwZveSZNvCatCq5QL9QgSoCrUnB68v6ve8S/j0WcuuVbf a6txxiXcrSIBuLGz22FnDvZzy5DXt8djORP9s=
DomainKey-Signature a=rsa-sha1; c=nofws; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:cc:content-type; b=HZD6LqZMFuVmuiwrTEL2vwUrlCTeGixWpwm4MvhbHPCRLU2V4NZTYXswvFLxuoTy5Z a+jZh2z94K1dn2uSYwxcQSGEFlilfL01S1Am/BQPA2EFrMH1vuMR+unFBM9ta8v/joFw +nqiDz4VJ8KH5TQUTo88iECNC5oZqDENXMKco=
MIME-Version 1.0
Sender chris@rebertia.com
In-Reply-To <D6671B7A-C8B1-4235-A50F-31D9F2AD7DD7@mcgill.ca>
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 Mon, 30 May 2011 23:54:09 -0700
X-Google-Sender-Auth HSRrV_S3ubxFdn2TiAmIgrKj_-c
Subject Re: scope of function parameters (take two)
From Chris Rebert <clp2@rebertia.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2304.1306824852.9059.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 82.94.164.166
X-Trace 1306824853 news.xs4all.nl 49181 [::ffff:82.94.164.166]:41983
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:6712

Show key headers only | 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