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/2003-June/036388.html below:

[Python-Dev] New PEP: 319

[Python-Dev] New PEP: 319 [Python-Dev] New PEP: 319Michel Pelletier michel@dialnetwork.com
Mon, 16 Jun 2003 01:51:02 -0500 (CDT)
> On Mon, 16 Jun 2003, Michel Pelletier wrote:
>
>>             def __init__(self):
>>                  self.counter = 0
>>
>>             def increment(self):
>>                 synchronize:
>>                     self.counter += 1
>
> What about just adding a parameter to try operator?
>
>              def increment(self):
>                  try self.counter_lock:
>                      self.counter += 1

Because I would like to remove the user-visible lock entirely.  Although
your idea is similar to PEP 310, which proposes a new keyword "with".  I
think using the try keyword for this is inapropriate.

-Michel



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