Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Comment
by
kubav
· 6y ago · 0 comments
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
Comments
No comments yet.
Better HN