Deprecating reload() ???

Skip Montanaro skip at
Mon Mar 15 12:49:58 CET 2004

    Dave> Maybe we could somehow switch off the generation of shared objects
    Dave> for modules in a 'debug' mode.

You'd have to disable the integer free list.  There's also code in
tupleobject.c to recognize and share the empty tuple.  String interning
could be disabled as well.  Everybody's ignored the gorilla in the room:

    >>> sys.getrefcount(None)

In general, I don't think that disabling immutable object sharing would be
worth the effort.  Consider the meaning of module level integers.  In my
experience they are generally constants and are infrequently changed once
set.  Probably the only thing worth tracking down during a super reload
would be function, class and method definitions.


More information about the Python-list mailing list