Re: python reference counting and exceptions

2006-09-13 Thread Andreas Huesgen
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

Re: python reference counting and exceptions

2006-09-12 Thread Gabriel Genellina
At Tuesday 12/9/2006 15:37, Andreas Huesgen wrote: In c++, it is possible to write a locking system similar to the one below: void myFunction() { # create a resource lock. Locks some resource ResourceLock myLock; # the following line may throw an exception doSt

RE: python reference counting and exceptions

2006-09-12 Thread Delaney, Timothy (Tim)
Andreas Huesgen wrote: > In c++, it is possible to write a locking system similar to the one > below: > > > void myFunction() > { > # create a resource lock. Locks some resource > ResourceLock myLock; > > # the following line may throw an exception > doStuff(); > } RII