[OLPC-devel] Re: [sugar] Pygtk and garbage collecting

Ivan Krstic krstic at solarsail.hcs.harvard.edu
Tue Aug 8 12:29:08 EDT 2006


Federico Mena Quintero wrote:
> This is pretty useful for managed objects which maintain non-managed
> data (file descriptors, memory buffers, database connections, etc.).
> 
> Does Python let you do something like this?

Yes, using the 'with' statement that's new in Python 2.5, which we'll
have on the laptop:

 http://docs.python.org/dev/whatsnew/pep-343.html

-- 
Ivan Krstic <krstic at solarsail.hcs.harvard.edu> | GPG: 0x147C722D



More information about the Devel mailing list