python reference counting and exceptions

Andreas Huesgen andreas.huesgen at arcor.de
Wed Sep 13 13:52:32 CEST 2006



Delaney, Timothy (Tim) wrote:
> RIIA - Resource Initialisation is Acquisition
> 
> Python is adding an RIIA mechanism in 2.5 - look at the "with"
> statement.
> 

Ah, thanks, thats exactly what I was looking for.


Gabriel Genellina wrote:
> Yes: the try/finally construct, which is *not* the same as a try/except. The finally clause is always executed, whether or not an exception is raised.

Yes, of course it must be the try finally construct and not try/except. 
Shame on me.... ;)

Andreas Huesgen



More information about the Python-list mailing list