A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-May/053773.html below:

[Python-Dev] PEP 343 - Abstract Block Redux

[Python-Dev] PEP 343 - Abstract Block Redux [Python-Dev] PEP 343 - Abstract Block ReduxAnders J. Munch andersjm at inbound.dk
Sun May 15 13:42:00 CEST 2005
Shane Hathaway wrote:
> Guido van Rossum wrote:
> >
> > Consider an application where you have to acquire *two* locks regularly:
> >
> You really have to write it like this:

Shane, you've already solved this one more elegantly:

def lockBoth():
    return combining(lock1.locking(), lock2.locking())

using the combining function you wrote earlier, which I assume will
make it into the library.

- Anders

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4