Re: with statements does not delete the object

2011-09-21 Thread Ben Finney
y...@zioup.com writes: > Is this the expected behaviour: You can learn the expected behaviour for ‘with’ in the documentation http://docs.python.org/reference/compound_stmts.html#the-with-statement>. > with mylib.token() as t: > do_something > > dir() > > In the last dir(), after t

with statements does not delete the object

2011-09-21 Thread yves
Is this the expected behaviour: with mylib.token() as t: do_something dir() In the last dir(), after the with "loop" is finished, t still shows up... I expected it to be unreferenced by then. -- Yves. http://www.SollerS.ca/