Best way to modify code without breaking stuff.

Carl Banks pavlovevidence at
Wed Jun 4 13:11:26 CEST 2008

On Jun 4, 3:44 am, Ivan Illarionov <ivan.illario... at> wrote:
> On Wed, 04 Jun 2008 00:25:19 -0700, Jesse Aldridge wrote:
> > I've got a module that I use regularly.  I want to make some extensive
> > changes to this module but I want all of the programs that depend on the
> > module to keep working while I'm making my changes.  What's the best way
> > to accomplish this?
> Version control system.
> Make your module a versioned repository.
> Make your changes in different place, then commit them.

That doesn't seem like a good solution for the OP's particular
problem.  To do it in a "different place", as you say, he'd have to
check out a new working copy, which might be a bit of overkill
depending on the size of the project.  It could also be problematic to
have separate working copies; there could be programs outside the
project that are configured to use a certain location, for instance.

One thing you could do with some version control systems is to switch
the particular version for the module in question between different
branches depending on whether you're using the tools or changing the
model.  (Subversion can do this, but I'm not sure if it's for
individual files or only directories.)

Carl Banks

More information about the Python-list mailing list