[issue19158] BoundedSemaphore.release() subject to races

Tim Peters report at bugs.python.org
Tue Oct 8 20:58:36 CEST 2013


Tim Peters added the comment:

Antoine, how strongly do you feel about this?  I confess I don't get it.  Copy+paste code duplication doesn't help any of readability, correctness, or ease of future maintenance, so I guess it's some micro-efficiency concern.  Really?! ;-)

Note that the patch doesn't _introduce_ calling the base class .release() - the code always did that.  All it does is put the pre-existing code in a `with:` block.  Minimal change.  Yes, the pre-existing code had to be indented, but no non-whitespace character changed.

Of course in this case it's trivial either way.  So if I have to duplicate the code to get your blessing, fine.  On the other hand, since it _is_ trivial either way, I'd rather not bother ;-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19158>
_______________________________________


More information about the Python-bugs-list mailing list