synchronized method

Graham Dumpleton grahamd at
Wed Feb 11 01:42:57 CET 2004

Peter Hansen <peter at> wrote in message news:<40290916.ECCDE661 at>...
> > Under normal execution the lock will not be released because you return
> > from the try clause. There is also the case that method isn't defined.
> If that were true, the finally clause would be pretty useless in many
> cases.  (Try it out yourself: it will work properly.)
> Also, isn't "method" defined as the argument to the synchronized()
> function at the top?

Hmmm, I stand corrected on both counts. It was one of the days I should
have kept my mouth shut. Too stinking hot here at the moment, my brain
isn't working. :-)

More information about the Python-list mailing list