"Garth N. Wells" <[email protected]> writes:
> I thought the issue we're discussing is that the above Python pattern, 
> which is the natural way to do things, can break in parallel because of 
> non-deterministic garbage collection and that we need an alternative?

The with statement (PEP 343) provides __exit__, which is deterministic.
That pattern is idiomatic and correct.  Relying on garbage collection
when a variable falls out of scope is the problem.

Attachment: pgp1sb1NLPOjU.pgp
Description: PGP signature

_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to