[PATCH 2 of 3] absolute imports for mercurial modules

Martin Geisler mg at lazybytes.net
Mon May 4 10:06:30 CDT 2009


Greg Ward <greg-hg at gerg.ca> writes:

> On Sat, May 2, 2009 at 6:52 PM, Martin Geisler <mg at lazybytes.net> wrote:
>> Simon Heimberg <simohe at besonet.ch> writes:
>>
>>> # HG changeset patch
>>> # User Simon Heimberg <simohe at besonet.ch>
>>> # Date 1240936971 -7200
>>> # Node ID da8bb0eb1d2eaacd838399d98d4e6bc764571685
>>> # Parent  1c64876cb225e06807c7ec9d00d26e08564fccbc
>>> absolute imports for mercurial modules
>>
>> I personally like this, I think it makes things more explicit. It is
>> also more future-proof than the current relative imports.
>
> I'm strongly in favour of Simon's first two patches.  As a newcomer to
> the Mercurial source, I find the messy imports in most modules make it
> unnecessarily hard to follow things.
>
> (Personally, I prefer to put imports from the standard library first,
> then imports from 3rd-party libraries, then finally imports from the
> local project. That seems to be a fairly common style in many
> languages. As long as we're contemplating tinkering like this, what
> about a patch to reorder imports like that?)

Definitely, I would like to see this as well. However, I'm just the
youngest crew member, so I think someone else should decide on such
coding style changes :-)

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090504/8aac14c8/attachment.pgp 


More information about the Mercurial-devel mailing list