Tim Peters added the comment:

This is the "right" way to do it:  the subclass wants to extend the behavior of 
the base class .release(), not to replace it.  Calling the base class 
.release() is the natural and obvious way to do that.  It's also utterly normal 
for a lock used by multiple methods to be acquired & released multiple times - 
that's what an RLock is for.  What's odd to my eyes is that Semaphore - before 
the patch - went out of its way to _not_ use an RLock in its condition variable 
(Conditions use an RLock by default, for good reasons).

About acquire(), this is a bugfix - I'm not looking here to change code that 
isn't broken ;-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19158>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to