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

[Python-Dev] Possible py3k io wierdness

[Python-Dev] Possible py3k io wierdness [Python-Dev] Possible py3k io wierdnessNick Coghlan ncoghlan at gmail.com
Mon Apr 6 13:08:47 CEST 2009
Alex Martelli wrote:
> Queue.Queue in 2.* (and queue.Queue in 3.*) is like that too -- the
> single leading underscore meaning "protected" ("I'm here for subclasses
> to override me, only" in C++ parlance) and a great way to denote "hook
> methods" in a Template Method design pattern instance.  Base class deals
> with all locking issues in e.g. 'get' (the method a client calls),
> subclass can override _get and not worry about threading (it will be
> called by parent class's get with proper locks held and locks will be
> properly released &c afterwards).

Ah, thank you - yes, that's the one I was thinking of. My brain was
telling me "threading", which makes some sense, since I put the Queue
conceptually in the same bucket as the rest of the locking constructs in
the threading module.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
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