[Python-ideas] revisit pep 377: good use case?
ethan at stoneleaf.us
Wed Feb 29 20:29:44 CET 2012
Craig Yoshioka wrote:
> I've tried classes, decorators, and passing the conditional using 'as',
> as suggested by Michael, so I disagree that with is not suitable here
> since I have yet to find a better alternative. If you want I can give
> pretty concrete examples in the ways they aren't as good.
I would be interested in your concrete examples.
As far as conditionally skipping the with body, where would that code
go? In __enter__? How would it know whether or not to skip?
More information about the Python-ideas