By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,941 Members | 1,753 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,941 IT Pros & Developers. It's quick & easy.

interaction of 'with' and 'yield'

P: n/a
I'm wondering if a generator that is within a 'with' scope exits the 'with'
when it encounters 'yield'.

I would like to use a generator to implement RAII without having to
syntactically enclose the code in the 'with' scope, and I am hoping that
the the yield does not exit the 'with' scope and release the resource.

Jul 31 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.