GC In Python: YAS (Yet Another Summary)

Lars Marius Garshol larsga at ifi.uio.no
Wed Jun 16 19:50:36 CEST 1999

* news at dorb.com
| At the risk of sounding like a lazy whiner. This would be more
| useful if it could run more like profile or pdb.

Hmmm. This sounds like a useful alternative to the current mode of

| Having to add calls like "r.add_object(non_GCed_object)" make it
| less useful.
For some uses, perhaps. I can probably still think of cases where the
original behaviour is wanted, but the idea is a good one. The reason I
didn't do it was simply that I wasn't sufficiently ambitious. :)

| Is there a way to capture the creation of any instance and call
| r.add_object?

A little experimentation lead to a trace function that worked. And
since it was so cool I just went ahead and added it to plumbo.
| In perfect world for lazy whiners this works, plumbo.run("myStuff")
| and it gives me a report.

This may be a perfect world for lazy whiners after all. :)

Check the web site again for a function that has a lazy mode. It
doesn't print anything unless there actually is a cycle, but other
than that it should make you happy.

--Lars M.

More information about the Python-list mailing list