On Thu, Mar 12, 2009 at 12:52 AM, Shane Hathaway <sh...@hathawaymix.org> wrote:
> Martijn Faassen wrote:
>> Since ``setuptools`` is a dependency of our packages anyway, we
>> can instead do the following::
>> Feel free to use that and also feel free to simplify existing
>> ``__init__.py`` modules. Just make sure ``setuptools`` is a declared
>> dependency of the package.
> Nit: In this case, two lines are better than one.
> import pkg_resources
> There's no need to use the lesser known __import__ function when an
> ordinary import statement will do.
Actually three lines will be required to replace that single line:
BTW, I am +1 for single line __import__ approach.
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -