What's the equivalent of this in IronPython? Is it just a try-finally block?
using (var something = new ClassThatImplementsIDisposable()) { // stuff happens here }
IronPython supports using IDisposable with with statement, so you can write something like this:
IDisposable
with
with ClassThatImplementsIDisposable() as something: pass
2.1m questions
2.1m answers
60 comments
57.0k users