Deprecating reload() ???

John Roth newsgroups at
Mon Mar 15 01:49:08 CET 2004

"David MacQuigg" <dmq at> wrote in message
news:rhj950ts4fbrbfadp0s5fmp3vn6bhh7ppc at
> I *would* like to do something about numbers and strings and other
> shared objects not getting updated, because that is going to be hard
> to explain.  Maybe we could somehow switch off the generation of
> shared objects for modules in a 'debug' mode.

It doesn't matter if numbers and strings get updated. They're
immutable objects, so one copy of a number is as good as
another. In fact, that poses a bit of a problem since quite
a few of them are singletons. There's only one object that
is an integer 1 in the system, so if the new version changes
it to, say 2, and you go around and rebind all references to
1 to become references to 2, you might have a real mess
on your hands.

On the other hand, if you don't rebind the ones that came out
of the original version of the module, you've got a different
mess on your hands.

John Roth
> -- Dave

More information about the Python-list mailing list