Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'imported': 0.09; 'subtle': 0.09; 'things,': 0.09; 'cc:addr:python-list': 0.11; '"from': 0.16; 'bugs.': 0.16; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; 'special.': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'sender:addr:gmail.com': 0.17; 'module': 0.19; 'work,': 0.20; 'import': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; "aren't": 0.24; 'skip': 0.24; 'cc:2**0': 0.24; 'source': 0.25; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'maybe': 0.34; 'common': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'doing': 0.36; 'clear': 0.37; 'name': 0.63; 'more': 0.64; 'forth': 0.81; 'imagining': 0.84; 'can!': 0.91; 'from.': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=h7eujnhcsvuXawTrbEmqHzAUvJrqtp8wtz1OfOqg6HM=; b=w2CiRugEC/+es+TwjFcmdU1dHGrRQlS/r7YztfC3VcppjLvxYwV2M5L7s32tZs4aa6 uYQzLYMADrOMWBBR9F8LjYjjxQm0Q4YIJCXWEwdltYsbzhXdfljEnwCVlK/c3oY3ApD6 YdQzBg0X3Ipi5ky1Stw2Ak/oK+IqeO2KUwOo+n+GD8aWcSaO9Cgc7O+RF3l8JUn8kKUV zmXfpbXjnFtPEpA15zZnXhDoPkWblYqSw5tpp40WIlgNnZodFDaR5kmJ3H/J6WgWsern sgSCh8yCIUQl9ABt0u+oODAhf15yWaSLFO1WjzKr6cxFY5vHMCBX76IzPzi1QT11rqaG hIWA== MIME-Version: 1.0 X-Received: by 10.52.34.109 with SMTP id y13mr83705vdi.8.1378404416416; Thu, 05 Sep 2013 11:06:56 -0700 (PDT) Sender: skip.montanaro@gmail.com In-Reply-To: <5228bf2d$0$29988$c3e8da3$5496439d@news.astraweb.com> References: <28b859f6-f14b-49d2-9e14-5d3febd33441@googlegroups.com> <5228bf2d$0$29988$c3e8da3$5496439d@news.astraweb.com> Date: Thu, 5 Sep 2013 13:06:56 -0500 X-Google-Sender-Auth: 1XdfG8x3SJUCKFImPlxZ6v0bTgo Subject: Re: Importing Definitions From: Skip Montanaro To: "Steven D'Aprano" Content-Type: text/plain; charset=UTF-8 Cc: Python 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1378404425 news.xs4all.nl 15947 [2001:888:2000:d::a6]:36579 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:53733 >> You can! Any name will work, functions aren't special. >> >> from module1 import method1, A, B, C, D, E > > Better practice is to use: > > import module1 > print module1.A > print module2.B > > and so forth since that makes it far more clear what you are doing and > where they come from. But it's not compulsory. Maybe I'm imagining things, but I think it's pretty common to see some big-ass modules imported using "from module import *". While people may think that's expedient, I think it can often be the source of subtle bugs. Skip