[Python-Dev] Patch for Weak References for Functions
Paul Prescod
paulp@ActiveState.com
Fri, 09 Mar 2001 18:19:41 -0800
Phil Thompson wrote:
>
>...
>
> To be honest, I don't see why weak references have been implemented as a
> bolt-on module that only supports one particular object type. The thing
> I most like about the Python implementation is how consistent it is.
> Weak references should be implemented for every object type - even for
> None - you never know when it might come in useful.
Weak references add a pointer to each object. This could add up for
(e.g.) integers. The idea is that you only pay the cost of weak
references for objects that you would actually create weak references
to.
--
Python:
Programming the way
Guido
indented it.