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-April/052878.html below:

[Python-Dev] PEP 310 and exceptions

[Python-Dev] PEP 310 and exceptions [Python-Dev] PEP 310 and exceptionsToby Dickenson tdickenson at devmail.geminidataloggers.co.uk
Sun Apr 24 19:31:56 CEST 2005
On Sunday 24 April 2005 07:42, Nick Coghlan wrote:
> Shane Hathaway wrote:

> > While we're on the subject of block handler method names, do the method
> > names need four underscores?  'enter' and 'exit' look better than
> > '__enter__' and  '__exit__'.

I quite like .acquire() and .release(). 

There are plenty of classes (and not just in the threading module) which 
already have methods with those names that could controlled by a 'with'. 

Those names also make the most sense in the C++ 'resource acquisition' model.


-- 
Toby Dickenson
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