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


Groups > comp.lang.python > #6720

Re: scope of function parameters (take two)

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <wolfgang@rohdewald.de>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'received:localnet': 0.07; 'subject:two': 0.07; 'case)': 0.09; 'subject:parameters': 0.09; 'wrote:': 0.14; 'disallow': 0.16; 'from:addr:rohdewald.de': 0.16; 'from:addr:wolfgang': 0.16; 'from:name:wolfgang rohdewald': 0.16; 'message-id:@rohdewald.de': 0.16; 'received:91.62': 0.16; 'reply- to:addr:rohdewald.de': 0.16; 'reply-to:addr:wolfgang': 0.16; 'subject:function': 0.16; 'wolfgang': 0.16; 'cc:addr:python-list': 0.17; 'language': 0.18; 'call.': 0.19; 'header:In-Reply-To:1': 0.21; 'cc:2**0': 0.22; 'oriented': 0.23; 'parameters.': 0.23; 'objects': 0.23; 'code': 0.24; 'function': 0.25; 'parameters': 0.26; 'object': 0.26; 'cc:addr:python.org': 0.30; 'calling': 0.31; 'list': 0.33; 'header:User-Agent:1': 0.35; 'function.': 0.35; 'charset:us-ascii': 0.36; 'change': 0.37; 'subject:: ': 0.38; 'subject: (': 0.39; 'called': 0.39; 'your': 0.60; 'header:Message- Id:1': 0.62; 'matter': 0.63; 'back': 0.63; 'free': 0.63; 'header :Reply-To:1': 0.72; 'reply-to:no real name:2**0': 0.72; 'partially': 0.84
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; t=1306831061; l=522; s=domk; d=rohdewald.de; h=Content-Transfer-Encoding:Content-Type:MIME-Version:In-Reply-To: References:Cc:Date:Subject:To:Reply-To:From:X-RZG-CLASS-ID:X-RZG-AUTH; bh=WjAwRtQGUJhipOMypKOw4HeqTHA=; b=Fzeqmh7FjVOihrPSMAOguUVfSPsrCy8nfkfaF8yP9azzTrx1ZnUZQVWMIAAbuSNDyXM KGFDr8vzA4xDlALIoaTHdMzqetus1USCdnzQjxXCLK1/HO79ncXvUI0ypoSEwg4qKAdHc XvQKwmPJI0BGvpjmnPzPRHFEkj3zeu3knAM=
X-RZG-AUTH :O2MIc0epdfgAjoV+frHI3UhxNCLBO5P+YS73lHhJYRD2uAuzaM+5N8MTpOrpK3il
X-RZG-CLASS-ID mo00
From Wolfgang Rohdewald <wolfgang@rohdewald.de>
To Henry Olders <henry.olders@mcgill.ca>
Subject Re: scope of function parameters (take two)
Date Tue, 31 May 2011 10:37:50 +0200
User-Agent KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.3; x86_64; ; )
References <F8395F78-615E-4FBD-B6FC-1D6173EAEA45@mcgill.ca> <201105310713.24842.wolfgang@rohdewald.de> <D6671B7A-C8B1-4235-A50F-31D9F2AD7DD7@mcgill.ca>
In-Reply-To <D6671B7A-C8B1-4235-A50F-31D9F2AD7DD7@mcgill.ca>
MIME-Version 1.0
Content-Type Text/Plain; charset="us-ascii"
Content-Transfer-Encoding 7bit
Cc "python-list@python.org" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To wolfgang@rohdewald.de
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.2312.1306831063.9059.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 82.94.164.166
X-Trace 1306831063 news.xs4all.nl 49047 [::ffff:82.94.164.166]:60964
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:6720

Show key headers only | View raw


On Dienstag 31 Mai 2011, Henry Olders wrote:
> 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.

I don't know any object oriented language where it is not
possible to change objects passed in as parameters. It
is up to the passed object (a list in your case) to allow
or disallow manipulations no matter how they are invocated,
and the object is the same in the calling code and in the
called function.

-- 
Wolfgang

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


Thread

Re: scope of function parameters (take two) Wolfgang Rohdewald <wolfgang@rohdewald.de> - 2011-05-31 10:37 +0200

csiph-web