Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'explicitly': 0.04; '(especially': 0.07; 'interpreted': 0.07; 'means,': 0.07; 'python': 0.09; 'ambiguity': 0.09; 'imported': 0.09; 'cc:addr :python-list': 0.10; 'gui': 0.11; 'tutorials': 0.15; '"from': 0.16; 'big,': 0.16; 'confusion': 0.16; 'fond': 0.16; 'globals.': 0.16; 'illustrate': 0.16; 'notation,': 0.16; 'oct': 0.16; 'reasonable.': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'variables': 0.17; '(or': 0.18; 'module': 0.19; 'variable': 0.20; 'changes': 0.20; 'sort': 0.21; 'import': 0.21; 'disabled': 0.22; 'either.': 0.22; 'suddenly': 0.22; "i'd": 0.22; 'received:74.125.82.174': 0.23; 'cc:2**0': 0.23; 'dependent': 0.23; 'third-party': 0.23; 'cc:no real name:2**0': 0.24; 'idea': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'declared': 0.29; 'disabling': 0.29; "i'm": 0.29; 'checks': 0.30; 'code': 0.31; 'structure': 0.32; 'could': 0.32; 'received:74.125.82': 0.33; 'received:google.com': 0.34; 'but': 0.36; 'received:74.125': 0.36; 'modules': 0.36; 'totally': 0.36; 'should': 0.36; 'enough': 0.36; 'possible': 0.37; 'does': 0.37; 'far': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'skip:" 10': 0.40; 'subject:-': 0.40; 'header:Received:5': 0.40; 'more': 0.63; 'stated': 0.69; 'forth': 0.75; 'fat': 0.84; 'dennis': 0.91; 'dozens': 0.91; 'proposal,': 0.91 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 :cc:content-type; bh=ItXu1+cJQWKredOaxWGvrm6bULFiIG+no0zjwBeH79k=; b=qxzUy3qtbN6rB+cJShNqwcGut5HGIcWYQnbQtP736J69TaWU5JJAq4A6nv6B3gJT/A nzpLZZLTRECiiol6Q/ABlXHQ3Ixsm0GPMDkQMhDXOAQJg9fuZEdzLR6NQo/ICB3xZzIX XXE4CmjOm58hW3oltWXQTfVqG6x+C9oWe0/1hek0yqoE0aePJGq7Pcz9zV6gh3T+Dgos SUUnwFDPp/aUhLSllllwrjPiFatgbdtvVi02fDFdmup4sCCD36gzQ6TNvUJFDHg0Pg6W r9rYAUxRoVg5ZRZTVfK8r2TSZ6XE409TfJ77RD1zhWZy2FjleewhJR9I5eD4a0Jz+tKw 53DQ== MIME-Version: 1.0 In-Reply-To: References: <5083c7da$0$29978$c3e8da3$5496439d@news.astraweb.com> <508448c6$0$29978$c3e8da3$5496439d@news.astraweb.com> <5084e819$0$29897$c3e8da3$5496439d@news.astraweb.com> Date: Tue, 23 Oct 2012 08:35:56 +0100 Subject: Re: A desperate lunge for on-topic-ness From: Joshua Landau To: Dennis Lee Bieber Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1350977759 news.xs4all.nl 6870 [2001:888:2000:d::a6]:41568 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31918 On 23/10/2012, Dennis Lee Bieber wrote: > On Mon, 22 Oct 2012 16:02:34 -0600, Ian Kelly > declaimed the following in gmane.comp.python.general: > >> On my wishlist for Python is a big, fat SyntaxError for any variable >> that could be interpreted as either local or nonlocal and is not >> explicitly declared as either. It would eliminate this sort of >> confusion entirely and make code that shadows nonlocal variables much >> more readable. >> > Which now makes code dependent upon changes to some imported modules > if someone is foolish enough to use the > > from xyz import * > > notation... > > I'd be very displeased if working code with local names suddenly > fails because some third-party package was updated. > > Yes, I prefer not to use the "from...*" notation, but how many > tutorials (especially of GUI toolkits, with their dozens of constants) > illustrate using the wildcard? I'm not particularly fond (or disliking) of the proposal, but we already make changes to the structure of locals/globals and so forth when someone does "from import *". Disabling checks when it is used is totally reasonable. Additionally, "SyntaxError: import * only allowed at module level". This means, as far as I grasp, one should never *manage* to create an ambiguity here. Ian already stated this idea should (due to neccessity) be disabled for possible globals.