migrating to packages
Hrvoje Niksic
hniksic at xemacs.org
Thu Oct 4 04:38:16 EDT 2007
Bruno Desthuilliers <bruno.42.desthuilliers at wtf.websiteburo.oops.com> writes:
> it's quite common to use the __init__.py of the package (as
> explained by Ben) as a facade to the internal organization of the
> package, so you can change this internal organization without
> breaking client code.
We agree on that. It is the OP who *wants* to access his modules
directly without ever naming the package. That is why I think he is
missing the point of having a package in the first place.
>> That way, if someone creates another module with using the same
>> name (mymodule), it won't conflict with yours. If you don't want
>> to change mymodule to mypackage.mymodule, why use a package in the
>> first place?
>
> Because you have too much code to keep it in a single file.
There is no "single file", the OP already has modules A and B.
More information about the Python-list
mailing list