[spambayes-dev] Re:
[Spambayes-checkins]spambayes/spambayesstorage.py, 1.33, 1.34
Meyer, Tony
T.A.Meyer at massey.ac.nz
Thu Sep 18 17:46:48 EDT 2003
[Tim]
> Guido actually appears to like to sort them by increasing length(!).
So do I! You've got to admit it makes it look prettier ;)
> * I like to split my imports into two groups, modules
> which are part of the Python distribution and modules which I wrote or
> which are otherwise third party. That just makes it easier to tell if
> I need to include other modules when tossing something out to my
website.
I like this too, although I tend to use three groups - part of the
Python distribution, part of that project (spambayes.*, for example),
and third party.
One reason that lends itself to one-per-line, IMO, is that it makes a
diff more obvious - you can see at a glance which import has gone,
rather than having to look for which one is missing. Similarly, it
makes things a bit easier for merging with cvs (at least with the
software I use) - if two people make edits to an import line (say one
adds an import and one removes one), then this will end up being a
conflict I have to manually resolve. One per line works out nicely.
OTOH, cvs doesn't really like shuffling imports about to satisfy the
aesthetic increasing length criteria :(
Just my 2c.
=Tony Meyer
More information about the spambayes-dev
mailing list