Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'operator': 0.03; 'subject:Python': 0.06; 'variables': 0.07; '22,': 0.09; 'function,': 0.09; 'subject:into': 0.09; 'variable,': 0.09; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'keyword.': 0.16; 'subject:variable': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'feb': 0.22; 'cc:addr:python.org': 0.22; 'lets': 0.24; 'passes': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'pascal': 0.31; 'though.': 0.31; 'stuff': 0.32; 'something': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'address.': 0.39; 'how': 0.40; 'subject:Can': 0.60; 'address': 0.63; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=pi2uKVna3gs8h7J16KvTzAV8Aa07MvZaxjGEcwj+zJA=; b=mr7wmpSdrAdz9kPZ21jSXo6tNK1Ivm3vN1mL8OfqJN8wkT8Huq2TRYBOfXtGu1Hs4w NPmfqn6MlYgyoy7zUD2rVgdOgSGRL6T8O5PWhVl2F5hYzhQe33oTECbzDh9cvFxXy+Jj h/y3waaBANCgb/4qUSvtDN9V1eSBIBeIvTiWYd6n6r2+OBlltwq474FEnw9qxWYgW5I1 Dzp5RY0AtZ5aksd9rNdI8basPLs/4TcL5YLq79Tnpz7EpdOICuODCy/0VasBOLyOacC5 rkHmf9JnRVfi5nMEaquxzBr7DU8zk94SYxkkxiVjLTGvIXcQKXHiIM8JenPpyTikTFSk BbnQ== MIME-Version: 1.0 X-Received: by 10.68.98.3 with SMTP id ee3mr13710239pbb.31.1393051012405; Fri, 21 Feb 2014 22:36:52 -0800 (PST) In-Reply-To: <87bny0w9w3.fsf@elektro.pacujo.net> References: <27ac2248-0ca3-4ba6-9d25-eaad324bc5e9@googlegroups.com> <87sird7wuw.fsf@handshake.de> <8454E8CB-E6E3-452F-8E54-9A77BFF34EC2@gmail.com> <87bny0w9w3.fsf@elektro.pacujo.net> Date: Sat, 22 Feb 2014 17:36:52 +1100 Subject: Re: Can global variable be passed into Python function? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1393051016 news.xs4all.nl 2896 [2001:888:2000:d::a6]:55503 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66876 On Sat, Feb 22, 2014 at 6:20 AM, Marko Rauhamaa wrote: > On the question of how variables can be passed to functions, C, of > course, has the & operator and Pascal has the "var" keyword. That doesn't pass a variable into a function, though. It passes the address of that variable, and C lets you stuff something into an address. That's not the same thing. ChrisA