[Zope3-dev] Big import blocks

Fred L. Drake, Jr. fred@zope.com
Thu, 20 Mar 2003 11:40:35 -0500


Guido van Rossum writes:
 > So I decided to count.  There are currently 4904 "from ... import ..."
 > lines in the entire Zope3 source tree (including tests and
 > zopeproducts).  Because many of these are of the form "from X import

I'd actually prefer that imports in the tests be ignored for this
purpose; a separate "API helper" module can be created for use from
test modules if it turns out to be needed.

 > Assuming this data is roughly correct, we can cut the number of this
 > particular kind of dead chickens roughly in half by creating a module
 > with a short name (e.g. "zapi") that imports the 120 most popular

I think this is a useful analysis, and would love to see something
like this done instead of continuing the current import hell.  A
script to perform the analysis would be good; additions could be made
to the API module when something becomes popular enough.


  -Fred

-- 
Fred L. Drake, Jr.  <fred at zope.com>
PythonLabs at Zope Corporation