Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.news-service.com!news2.euro.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:two': 0.07; 'python': 0.08; 'globals': 0.09; 'header:In-reply-to:1': 0.09; 'subject:parameters': 0.09; 'wrote:': 0.14; '1:13': 0.16; 'concise.': 0.16; 'did,': 0.16; 'rohdewald': 0.16; 'subject:function': 0.16; 'wolfgang': 0.16; 'cc:addr:python-list': 0.17; 'language': 0.18; 'call.': 0.19; 'seems': 0.21; 'cc:2**0': 0.22; 'fine': 0.22; 'function': 0.25; 'parameters': 0.26; 'thanks.': 0.27; '(you': 0.29; 'effect': 0.29; 'cc:addr:python.org': 0.30; 'changes': 0.30; 'print': 0.31; 'seem': 0.32; 'steven': 0.32; 'list': 0.33; 'things': 0.33; 'received:24': 0.35; 'received:ca': 0.36; 'charset:us-ascii': 0.36; 'received:10.0.1': 0.37; 'url:python': 0.38; 'url:org': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'subject: (': 0.39; 'really': 0.40; 'according': 0.63; 'back': 0.63; 'free': 0.63; 'link': 0.64; 'partially': 0.84; 'received:videotron.ca': 0.84; 'url:tutor': 0.84 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Subject: Re: scope of function parameters (take two) From: Henry Olders In-reply-to: <201105310713.24842.wolfgang@rohdewald.de> Date: Tue, 31 May 2011 02:37:47 -0400 References: <201105310713.24842.wolfgang@rohdewald.de> To: "wolfgang@rohdewald.de" X-Mailer: Apple Mail (2.1084) Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306823871 news.xs4all.nl 49048 [::ffff:82.94.164.166]:51247 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6710 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. python seems to be undergoing changes all the time. List comprehensions were added in python 2.0, according to wikipedia. I like list comprehensions and use them all the time because they are powerful and concise. > > did you read the link Steven gave you? > http://mail.python.org/pipermail/tutor/2010-December/080505.html Yes, I did, thanks. Henry