Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!newsfeed.xs4all.nl!newsfeed4.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'heavily': 0.04; 'syntax': 0.04; 'interpreter': 0.05; 'anticipate': 0.09; 'forcing': 0.09; 'namespace': 0.09; 'whatever.': 0.09; 'contribute': 0.11; 'python': 0.11; '"in': 0.16; 'file"': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'janssen': 0.16; 'qualified.': 0.16; 'readability': 0.16; 'scope.': 0.16; 'wrote:': 0.18; 'looked': 0.18; 'thu,': 0.19; 'import': 0.22; 'load': 0.23; 'skip:_ 20': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; '13,': 0.31; 'guess': 0.33; 'could': 0.34; 'objects': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'keyword': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'issue': 0.38; 'that,': 0.38; 'environment.': 0.39; 'to:addr:python.org': 0.39; 'up,': 0.60; 'simply': 0.61; 'name': 0.63; 'effectively:': 0.84; 'subject:Don': 0.91; 'imagine': 0.93; '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=+zLyR76M0up+IP+FuvKHZ8smuXEVQ/98vPKoJd6tL4Y=; b=FpG3LLRvH7X25OyXfZYGlJDe13tgGOfNvxNbaTpj3mCSoiMYCagRVsEoZ/Ge1lmYPT xasewzulyT+HbZzqDhlzPHGxpTZtjdceJzdLyeh8JZY8IVG7xDmfrRyC3MZOVDrD1Vs3 EY3bbWD6S61ICk0QuCKaGMH0nrxn0QhU6k3Tj4M+iDVBpiQ49i5i2qAdVJ01LuG6rLlv OsQsufQRQZ99ftkav74jUYIkfCSfhdo3Qcjwuf6gc9SRyZu0zvFhnCKl41wMkT1mWJEC QHlGnzzujeQWX9PUyzCZgDYyZnS/vSwqkxipyb6iCHD74GRwPCUgwEy2wYCDpwLGsfCn MMeQ== MIME-Version: 1.0 X-Received: by 10.52.65.238 with SMTP id a14mr8973904vdt.24.1371083307757; Wed, 12 Jun 2013 17:28:27 -0700 (PDT) In-Reply-To: References: Date: Thu, 13 Jun 2013 10:28:27 +1000 Subject: Re: "Don't rebind built-in names*" - it confuses readers 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371083315 news.xs4all.nl 15945 [2001:888:2000:d::a6]:48937 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:47871 On Thu, Jun 13, 2013 at 10:26 AM, Mark Janssen wrote: >> There's no point forcing them to be looked up in a two-step process. >> If you want that, you can simply reference them as >> __builtins__.whatever, but you can instead just reference them as the >> unadorned name whatever. They contribute heavily to the simplicity and >> readability of Python code - imagine if every call to len() had to be >> qualified. > > Well I would anticipate a keyword ("load"?) so one could load a > particular namespace into the global scope. The issue I guess is when > should modules be "on file" vs. "in memory" like the builtins? The > reason this is coming up, is because I would like to imagine a data > ecosystem, where I can import a set of objects from the network as if > they are local right into my interpreter environment. The syntax you describe is effectively: from __builtins__ import * ChrisA