Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'function,': 0.07; 'builtins': 0.09; 'imported': 0.09; 'len,': 0.09; 'namespace': 0.09; 'repr': 0.09; 'properly': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'magic.': 0.16; 'merely': 0.16; 'namespace.': 0.16; 'wrote:': 0.17; 'saying': 0.18; 'feb': 0.19; 'module': 0.19; 'import': 0.21; 'purposes': 0.23; 'header:In- Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'fri,': 0.30; '(2)': 0.32; 'johnson': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; '(1)': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'serve': 0.36; 'but': 0.36; 'does': 0.37; 'level': 0.37; 'two': 0.37; 'being': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'your': 0.60; 'side': 0.61; '2013': 0.84; 'rick': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=rZKGigpwwg/paE45XYTbC0p7qxbg3Lu8wPoXYbDNVuQ=; b=yNWSU/PQn9ixxs6x4InRwapvFBEgL7RwvoGp/8QemmO9LXZnCDYhvOHmLkfGuTTRP/ 28CZTeamG/VR5BZcp07RxMxMzZoCv7f+/YLFdP+Nd+3Rq0s0SXtvUfSc+4oEDv1wZM6p 2QsAkZhHW1CPkIlbC882cu4fqt4Epj6d8nux6vdIaZu8U9IElWMdJyQzh4OPHHclO6nP yN/U9JIKzY3Ptq1WZeIvBvftFR2BH/hvuIZG9iUeUMajpJDoBwKMLa4qhzXr+yQkiUUe GiPFwmRaTAWD/4uzOXXaH4RD/YksFAMJHxksvFbyU3tNeSdm6Dd3u2zhacUv4HXRF1kS YPVA== MIME-Version: 1.0 X-Received: by 10.58.12.200 with SMTP id a8mr5351232vec.52.1360308498891; Thu, 07 Feb 2013 23:28:18 -0800 (PST) In-Reply-To: <9718523e-12dc-4228-8879-27965b7b3d30@googlegroups.com> References: <02ced8e2-5967-4ce0-b257-83c3a3fbaf8e@googlegroups.com> <9718523e-12dc-4228-8879-27965b7b3d30@googlegroups.com> Date: Fri, 8 Feb 2013 18:28:18 +1100 Subject: Re: PyWart: Namespace asinitiy and the folly of the global statement 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360308501 news.xs4all.nl 6881 [2001:888:2000:d::a6]:47349 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38429 On Fri, Feb 8, 2013 at 6:23 PM, Rick Johnson wrote: > from builtins import print, len, repr > from builtins import * # This is not recommended! > > This would serve two purposes (1) the reader would know which builtins where being used in this module (2) the names would be bound properly to the module namespace. But this does not answer your question, merely a side note > > So your assertion is wrong. Built-ins /would/ be available at the module level with no qualification just as they are now. But they would also be available in /every/ namespace because how else would we use them Chris? So what you're saying is that builtins are available without qualification inside a function, but other names imported into the module namespace aren't? MAGIC. ChrisA