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!newsfeed1.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.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.06; 'subject:into': 0.09; "wouldn't": 0.14; "'is',": 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'subject:variable': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'later': 0.20; 'import': 0.22; 'header:User-Agent:1': 0.23; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; '>>>>': 0.31; 'subject:?': 0.36; 'skip:o 20': 0.38; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'changed': 0.39; 'received:org': 0.40; 'subject:Can': 0.60; 'became': 0.64; 'different': 0.65 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Sun, 02 Mar 2014 11:48:15 -0700 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131118 Thunderbird/17.0.11 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Can global variable be passed into Python function? References: <27ac2248-0ca3-4ba6-9d25-eaad324bc5e9@googlegroups.com> <871tynznpd.fsf@elektro.pacujo.net> <53104798$0$11113$c3e8da3@news.astraweb.com> <87ha7jy2qs.fsf@elektro.pacujo.net> <87k3ceeq0m.fsf@elektro.pacujo.net> <87zjlad8q4.fsf@elektro.pacujo.net> <874n3irz04.fsf@elektro.pacujo.net> <87k3ceqhti.fsf@elektro.pacujo.net> <87mwh9969m.fsf@elektro.pacujo.net> <5312ed4b$0$29985$c3e8da3$5496439d@news.astraweb.com> <87ha7h9c40.fsf@elektro.pacujo.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1393786109 news.xs4all.nl 2895 [2001:888:2000:d::a6]:52701 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67458 On 03/02/2014 03:07 AM, Chris Angelico wrote: > >>>> import os >>>> type(os.POSIX_FADV_RANDOM) > > > So use ==. If it's later changed and you have to instead use 'is', you > can change your code. I don't see why == wouldn't continue to work if os.POSIX_FADV_RANDOM became an object of a different type.