Deprecating reload() ???

John Roth newsgroups at jhrothjr.com
Mon Mar 15 13:43:07 EST 2004


"David MacQuigg" <dmq at gain.com> wrote in message
news:tuob50liqn5mcrbvhu7qpq12dsa9im73un at 4ax.com...
> On Mon, 15 Mar 2004 05:49:58 -0600, Skip Montanaro <skip at pobox.com>
> wrote:
>

>
> I'm having trouble understanding the benefit of using shared objects
> for simple numbers and strings.  Maybe you can save a significant
> amount of memory by having all the *system* modules share a common
> 'None' object, but when a user explicitly says 'M1.x = None', surely
> we can afford a few bytes to provide a special None for that
> reference.  The benefit is that when you change None to 'something' by
> editing and reloading M1, all references that were created via a
> reference to M1.x will change automatically.

I believe it's a performance optimization; the memory savings
are secondary.

> We should at least have a special 'debug' mode in which the hidden
> sharing of objects is disabled for selected modules. You can always
> explicitly share an object by simply referencing it, rather than
> typing in a fresh copy.

That would have rather disasterous concequences, since
some forms of comparison depend on there only being
one copy of the object.

>
> -- Dave
>





More information about the Python-list mailing list