[Web-SIG] a convenient way to deeply nest try/finally statements
Shannon -jj Behrens
jjinux at gmail.com
Fri Oct 14 02:05:54 CEST 2005
On 10/11/05, Paul Moore <p.f.moore at gmail.com> wrote:
> On 10/11/05, Shannon -jj Behrens <jjinux at gmail.com> wrote:
> > I'm posting this in the hope someone else will find it useful. If you
> > want it, consider it in the public domain.
> Hmm, I like it. Thanks - saves me waiting for Python 2.5 and the
> "with" statement :-) (It was badly mangled by gmail, but still
> possible to understand the principle).
Reposted from the baypiggies mailing list so as not to cross post:
I was following the "with" statement thing for a while, but eventually
gave up on keeping up with the dev mailing list. Please correct me if
I'm wrong, but the benefit of my library is also that you don't have
to nest things inside each other. I.e. it's a flat list of (init,
destruct) that is implemented as nested try/finallys but doesn't look
like that. Hence, it's easy to construct such lists and rearrange
them dynamically [or inject things into them from within subclasses].
Am I mistaken?
Hacking is to climbing Mt. Everest as
software engineering is to building a Denny's there.
More information about the Web-SIG