Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'tree': 0.05; 'subject:Python': 0.06; '21,': 0.07; 'assignment': 0.07; 'explicit': 0.07; 'variables': 0.07; 'skip:v 70': 0.09; 'subject:into': 0.09; 'variables.': 0.09; 'python': 0.11; '+11': 0.16; 'personally,': 0.16; 'program),': 0.16; 'subject:variable': 0.16; 'surprising': 0.16; 'vary.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'feb': 0.22; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'received:172.16': 0.29; 'am,': 0.29; 'go.': 0.31; 'implicit': 0.31; 'lessons': 0.31; 'something': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'accessing': 0.36; 'subject:?': 0.36; 'message-id:@gmail.com': 0.38; 'thank': 0.38; 'tired': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'subject:Can': 0.60; 'new': 0.61; 'course': 0.61; 'header:Message-Id:1': 0.63; 'refer': 0.63; 'charset:windows-1252': 0.65; 'fact,': 0.69; 'to,': 0.72; 'lack': 0.78; '2014,': 0.84; 'batchelder': 0.84; 'doesn\x92t': 0.84; 'it\x92s': 0.84; 'hate': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=/2Sjj5mHtcbuATuPPvoCL9RgfauWSPSF+g7yrDhkbY4=; b=u1aUslMvQG4yMdKUSNnmx9jI4C6oR9F8d1/5mekA8LZYU7EKOzbziaJ6SYCkdbOigF 6mFtrm2mtZlpj0/NX2Rnp4BEJrXYavbKorb28B+uatqpZ6Kl62+gNBkFdUZoU18aLKrU UR0jp0GTSUvQZNgoCCwCnCtT4M/wwBu9a6AvQUFmk9wNE4SpEuUCU+LwZUrjlxpszCXu p+spILN/Js4bF88dG50XSNhQW1LPCcA3T4pzPNUUbEujYg6qlcIUeJOK95apPiTIeYEv 31HOQJB+csmiHSgRaRyIu2ZVZXJrb1Iam7W+tmQzsHhmzTofaoEcB2pv38wqxb0dZyfW lzxg== X-Received: by 10.68.35.129 with SMTP id h1mr10508133pbj.163.1393005560963; Fri, 21 Feb 2014 09:59:20 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: Can global variable be passed into Python function? From: Travis Griggs In-Reply-To: Date: Fri, 21 Feb 2014 09:59:17 -0800 Content-Transfer-Encoding: quoted-printable References: <27ac2248-0ca3-4ba6-9d25-eaad324bc5e9@googlegroups.com> <87sird7wuw.fsf@handshake.de> To: python-list@python.org X-Mailer: Apple Mail (2.1827) 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1393005565 news.xs4all.nl 2862 [2001:888:2000:d::a6]:35839 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66837 On Feb 21, 2014, at 4:13 AM, Ned Batchelder = wrote: > Man, do I hate this idea that Python has no variables. It has = variables (names associated with values, and the values can change over = the course of the program), they just don't work the same as C or = Fortran variables. In fact, they work exactly the same as Javascript or = Ruby variables. Thank you! +11 I get tired of the =93Python doesn=92t have variables=94 line. What makes Python = variables/bindings/references/aliases/namedvalues/slots/bucketsofstuff = surprising to new arrivals from other language kingdoms, is that = accessing is pragmatically implicit (walks the scope tree for you) and = assignment may require explicitness. IOW, for some =93variables=94, you = have to do something explicit to make the variable you want to refer to, = vary. Some might say there is a lack of symmetry. Pros and cons. Personally, I don=92t care. It=92s one of those lessons you just learn = as you go.=