On Wed, Apr 15, 2009 at 12:03 AM, Mads Kiilerich <[email protected]> wrote: > TK Soh wrote, On 04/15/2009 01:27 AM: >> >> On Tue, Apr 14, 2009 at 11:02 PM, Mads Kiilerich<[email protected]> >> wrote: >> >>> >>> # HG changeset patch >>> # User Mads Kiilerich<[email protected]> >>> # Date 1239750129 -7200 >>> # Node ID c6d3fe0afabcf6e9c7fc9a3666e74a4efbb37b19 >>> # Parent ee7293383d6bec98567ac26c2dbf9b1956852a0c >>> thgutil: Don't import * >>> >> >> Just wondering. What's wrong with importing *? >> > > The primary reason for me was that right now it was hard for me to figure > out which methods in thgutil was used. "Readability counts." "Explicit is > better than implicit." > > Another reason is that demandimport loads namespaces on demand and thus > doesn't work with import *. And this is python with nice namespaces, not php > ;-) "Namespaces are one honking great idea -- let's do more of those!" > > I can't find it written in any Mercurial style guide, but notice that > "import *" hardly is used - only to merge the util.py sub-modules. > > http://effbot.org/zone/import-confusion.htm has an opinion against "from ... > import" too. > > pylint also considers it worth a warning. > > So ... no big issue, but several good reasons for just using plain imports.
Thanks for clarifying this. Sound like enough good reasons to me too :-) >> BTW, the comment isn't very accurate, IMO. >> > > Right. It should have been "menuthg" ;-) > > /Mads > > ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Tortoisehg-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop
