Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.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.133 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.74; '*S*': 0.01; 'python': 0.11; 'def': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'keyword,': 0.16; 'keyword.': 0.16; 'pity': 0.16; 'subject:non': 0.16; 'wrote:': 0.18; 'aug': 0.22; 'print': 0.22; 'mon,': 0.24; 'header:In-Reply-To:1': 0.27; 'skip:p 30': 0.29; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'easier': 0.31; 'too.': 0.31; 'programmers': 0.33; 'something': 0.35; 'received:google.com': 0.35; 'subject:skip:d 10': 0.36; "didn't": 0.36; 'subject:?': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'enough': 0.39; 'skip:p 20': 0.39; 'even': 0.60; 'remove': 0.60; 'helps': 0.61; 'tag': 0.61; 'protect': 0.79; "else's": 0.84; 'pardon': 0.84; 'stronger': 0.84; 'technically': 0.84; '2013': 0.98 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:to :content-type; bh=xCmtbukqaoJFTfqkhvZj2O5UPqlo9MkF5NmQYYRcQ1g=; b=wbF3grk3ODppEFeky9f7WJBWWPl8H01yf4GRQMxMq2j2AXdKUmVlQlje009Bvy1t2l OfrptBSBJvjAorV2asRHoPxe1X0dfnu5TV23U57+Grs2WXK+DpaZIf6Jfio/fV8PzXyt AcbzhhNmvx5+HTMCU9ZVtrIXnZ2KY1ExM8MUed321uQ45SFOyPUcJ/Tp0UveSYnmgVN2 bbb26eDaqMc1Zf1lhf/RjWa/VXifHCf62jzEhRpyWs+FyEW/j7Uap2eBtAcHXTBpwS57 Uosd1FMVJd2+jyOI+CGl+ZFTsjD0b+Sa2bOThjqqYKtzqYk/3jVdQwpbU/v0/uzfE8W6 KOdg== MIME-Version: 1.0 X-Received: by 10.220.199.5 with SMTP id eq5mr13834830vcb.16.1376924648219; Mon, 19 Aug 2013 08:04:08 -0700 (PDT) In-Reply-To: <521231F2.6070407@rece.vub.ac.be> References: <520f9054$0$30000$c3e8da3$5496439d@news.astraweb.com> <5211C5BD.5040209@rece.vub.ac.be> <5211D464.5090303@rece.vub.ac.be> <5211DF6C.6030603@rece.vub.ac.be> <52120783.8040008@rece.vub.ac.be> <521231F2.6070407@rece.vub.ac.be> Date: Mon, 19 Aug 2013 16:04:08 +0100 Subject: Re: Importing variables non-deterministic? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1376924657 news.xs4all.nl 15911 [2001:888:2000:d::a6]:39936 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52692 On Mon, Aug 19, 2013 at 3:55 PM, Antoon Pardon wrote: > Pity enough they chose a > way that didn't allow programmers to protect names they thought > important enough to do so too. As of Python 3, we can redefine something that used to be a keyword, which is even stronger than a constant. def print(*args,print=print,**kw): print("##",*args,**kw) What easier way to tag all your print calls? And this is why it helps to have nothing technically constant. You should be able to do the same with anything, without having to go and edit someone else's code to remove the 'const' keyword. ChrisA