painful debugging: techniques?

Michael Hudson mwh at python.net
Sun Apr 11 12:12:22 EDT 2004


Richie Hindle <richie at entrian.com> writes:

> [Hung Jung]
> > The question now is: how can we stop this from happening to other people?
> > [...] So far, I think Peter Otten's approach (search through the source
> > code) may be the most practical way.
> 
> Make weakref.ref() check that its second argument is a callable?
> 
> (I know, "patches welcome" 8-)

I *believe* that in current CVS python, a None second argument to
weakref.ref() is treated as if there was no argument (i.e. how the OP
expected).

Someone who's not behind a modem and several layers of terminal
emulation (none of which agree on the encoding being used) should
check :-)

Cheers,
mwh

-- 
34. The string is a stark data structure and everywhere it is
    passed there is much duplication of process.  It is a perfect
    vehicle for hiding information.
  -- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html



More information about the Python-list mailing list