importing two modules with the same name
pitonero at gmail.com
Sun Mar 20 00:22:27 CET 2005
Tim Jarman wrote:
> But if your foo is under your control, why not do everyone a favour
> it something else?
His case is a canonical example of a patch. Often you'd like to choose
the "patch" approach because:
(1) the third-party may eventually incorporate the changes themselves,
hence you may want to minimize changes to the name of the module in
your code, so one day in the future you may simply remove the patch, or
(2) you are testing out several ideas, at any point you may want to
change to a different patch, or simply roll back to the original
(3) your product is shipped to different clients, each one of them
requires a different twist of the shared module, or
(4) your program and your data files are versioned, and your program
structure needs cumulative patches in order to be able to work with all
previous data file versions.
These types of needs are rather common.
More information about the Python-list