[Python-Dev] Product iteration
Moshe Zadka
Moshe Zadka <moshez@math.huji.ac.il>
Wed, 26 Jul 2000 16:33:46 +0300 (IDT)
On Wed, 26 Jul 2000, Guido van Rossum wrote:
> Since this is still an improvement over current practice (where a
> finalizer hanging off a cycle may never be called) and there are no
> serialization issues, I don't see the problem.
Today inner functions don't create cycles involving local variables.
Lexical scoping would change that.
> If you want to use weak references, please try to specify *in detail*
> which objects would have weak references to which other objects and
> how the system would resolve these... I'm never sure that things can
> be made 100% safe using this technique, so it may help to spell it out
> for me!
OK, how's that: inner functions have weak reference to variables in the
same scope
def f():
x = 1
def g():
pass
g would have only a weak reference to "x".
I'm changing "no reference" to "weak reference", so I'm not incrementing
effective reference counting.
--
Moshe Zadka <moshez@math.huji.ac.il>
There is no IGLU cabal.
http://advogato.org/person/moshez