[issue12960] threading.Condition is not a class

Nikolaus Rath report at bugs.python.org
Wed Sep 14 15:16:52 CEST 2011


Nikolaus Rath <Nikolaus at rath.org> added the comment:

On 09/14/2011 04:29 AM, STINNER Victor wrote:
> 
> STINNER Victor <victor.stinner at haypocalc.com> added the comment:
> 
>> Yes, but further down it still says:
>>
>> """
>> class threading.Condition([lock])
>>
>>      If the lock argument is given and not None, [....]
>> """
> 
> What do you suggest? Replace it by class threading._Condition?

I don't have an optimal solution that would fit into the prescribed
layout. I think the best we can do is keep calling it class threading
Condition, but mention in the very first sentence that it isn't actually
a class:

class threading.Condition([lock]):

    threading.Condition is not actually a class but a factory function.
    The returned instance, however, is guaranteed to have the behaviour
    of a threading.Condition class as described here.

    If the lock argument...

Best,

   -Nikolaus

----------

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


More information about the Python-bugs-list mailing list