ParentFull threadkubav·To implement scope guard you can use with statement and implement __enter__, __exit__ methods. It is not real RAII as object is not destroyed on exit but it is still quite useful.http://effbot.org/zone/python-with-statement.htmView on HN