Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; 'library': 0.13; 'circular': 0.15; 'received:72.11': 0.16; 'received:72.11.125': 0.16; 'received:72.11.125.166': 0.16; 'refactoring': 0.16; 'wrote:': 0.18; 'subject:Question': 0.19; 'trying': 0.21; 'bonus': 0.21; 'header:In-Reply-To:1': 0.22; 'works.': 0.23; 'code': 0.26; 'testing': 0.26; 'separate': 0.28; 'importing': 0.29; 'imported': 0.30; 'header:User-Agent:1': 0.33; '(not': 0.35; 'to:addr:python- list': 0.35; 'but': 0.37; 'think': 0.38; 'easier': 0.38; 'files': 0.39; 'to:addr:python.org': 0.40; 'received:websitewelcome.com': 0.64; 'received:69.93': 0.67 Date: Tue, 28 Feb 2012 09:58:28 -0800 From: Ethan Furman User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: python-list@python.org Subject: Re: Question about circular imports References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: mail.admailinc.com ([192.168.10.136]) [72.11.125.166]:3310 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 4 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1330455105 news.xs4all.nl 6972 [2001:888:2000:d::a6]:50486 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20998 OKB (not okblacke) wrote: > Anyway, testing this just reinforced my distaste for circular > imports. Just trying to think about how it ought to work with a > importing c but then c and d importing each other makes my brain hurt. > Refactoring the files so that common code is in a separate library > imported by both is easier to understand, and has the nice side bonus > that it works. > +1 QOTW