[Zope] Styles of import in Zope (2 and 3)
Marco Bizzarri
marco.bizzarri at gmail.com
Sun Aug 31 10:39:26 EDT 2008
On Sun, Aug 31, 2008 at 3:04 AM, Chris McDonough <chrism at plope.com> wrote:
> One goal to shoot for when you do imports is to be able to remove an imported
> name by deleting a line as opposed to editing one (it makes reading diffs a bit
> easier). E.g. instead of:
>
> from foo import one, two, three
A lot of this in my code :-(
> I usually either do:
>
> import foo
> foo.one
Yes, I'm looking into this.
> Or:
>
> from foo import one
> from foo import two
> from foo import three
Too many of them... maybe an hint I should refactor something :-) ?
> Either way makes diffs cleaner.
>
> One thing I always avoid is "from foo import *".
At least, I've avoided this sin ;)
> - C
>
--
Marco Bizzarri
http://notenotturne.blogspot.com/
http://iliveinpisa.blogspot.com/
More information about the Zope
mailing list