Re: Re[2]: RIIA in Python 2.5 alpha: "with... as"

2006-04-11 Thread Duncan Booth
Alexander Myodov wrote: > Or maybe you have an idea how this can be fixed? The > simplest way I see is putting all the "controlled" variables into a > dedicated class... and do that each time for each block of variables I > need control lifetime. Is there any simpler way? I wouldn't use the word

Re: Re[2]: RIIA in Python 2.5 alpha: "with... as"

2006-04-11 Thread Diez B. Roggisch
>> No, it means that Python 2.5 supports 'resource initialisation is >> acquisition', but that has nothing to do with the restricting the >> lifetime of a variable. > Sorry, I misworded the question - RIIA is indeed present at least by > the reason that the examples from PEP pass. Agree, my problem

Re[2]: RIIA in Python 2.5 alpha: "with... as"

2006-04-11 Thread Alexander Myodov
Hello Duncan, You wrote: > Alexander Myodov wrote: >> So, with 2.5, I tried to utilize "with...as" construct for this, but >> unsuccessfully: >> ... >> So, does this mean that we still don't have any kind of RIIA in >> Python, any capability to localize the lifetime of variables on a >> level less