[Zope3-dev] PyCon DC 2003: Call For Papers

Barry A. Warsaw barry@zope.com
Thu, 5 Dec 2002 10:44:59 -0500


>>>>> "SH" == Shane Hathaway <shane@zope.com> writes:

    SH> I've been trying out a complementary convention in
    SH> AdaptableStorage: all public classes are available through a
    SH> special module called "public".

Nice!
    
    SH> ... which are essentially equivalent and easy to translate.
    SH> But what if you want to import a lot of classes from another
    SH> Package?  Java:

    | import jobboard.JobBoard;
    | import jobboard.HTMLJobBoardRenderer;
    | import jobboard.XMLRPCJobBoardRenderer;

    SH> In Python you can shorten this to:

    | from jobboard.public import JobBoard, HTMLJobBoardRenderer,\
    |      XMLRPCJobBoardRenderer

I'll court heresy and say that

from jobboard.public import *

isn't that horrible.  Using your convention, you /know/ you won't get
any names not intended for public consumption, which is one big
downside of import-*.  It also avoids conflict with Jim's "no
backslash" law :).

-Barry