skip at pobox.com
Fri Jun 1 11:46:28 EDT 2001
Remco> On the other hand, it's irritating that things that used to be
Remco> imported with a 'from import *' aren't anymore. The old mechanism
Remco> was that names that shouldn't be imported had prefix _; there are
Remco> a few of those in httplib. Why does it suddenly have an __all__
Remco> that contains only HTTP?
There are plenty of modules that don't adhere to the "'_' makes it private"
convention. Before __all__ appeared, they would pollute the namespace of
whoever imported them using "from ... *". In priciple, __all__ is an okay
mechanism to avoid this problem, but in practice it's difficult to get
right, particularly because it must be maintained manually.
Skip Montanaro (skip at pobox.com)
More information about the Python-list