[Python-Dev] __all__ in urllib

Jack Jansen jack@oratrix.nl
Tue, 06 Mar 2001 14:31:12 +0100


The __all__ that was added to urllib recently causes me quite a lot of grief 
(This is "me the application programmer", not "me the macpython maintainer"). 
I have a module that extends urllib, and whereas what used to work was a 
simple "from urllib import *" plus a few override functions, but with this 
__all__ stuff that doesn't work anymore.

I started fixing up __all__, but then I realised that this is probably not the 
right solution. "from xxx import *" can really be used for two completely 
distinct cases. One is as a convenience, where the user doesn't want to prefix 
all references with xxx. but the other distinct case is in a module that is an 
extension of another module. In this second case you would really want to 
bypass this whole __all__ mechanism.

I think that the latter is a valid use case for import *, and that there 
should be some way to get this behaviour.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | ++++ see http://www.xs4all.nl/~tank/ ++++