Re:C++ the Good Parts (2014)
by kubav on Thursday October 01, 2020 @07:56AM
(#24649877)
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.htm