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