[issue12960] threading.Condition is not a class

2011-09-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
resolution:  - wont fix
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12960
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12960] threading.Condition is not a class

2011-09-17 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I don't think this is important enough. It's now a class anyway in 3.3+.

--
nosy: +georg.brandl

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12960
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12960] threading.Condition is not a class

2011-09-17 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

I recommend just closing this.

--
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12960
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12960] threading.Condition is not a class

2011-09-15 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
versions:  -Python 2.6, Python 3.1, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12960
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12960] threading.Condition is not a class

2011-09-14 Thread STINNER Victor

STINNER Victor victor.stin...@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?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12960
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12960] threading.Condition is not a class

2011-09-14 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

 What do you suggest? Replace it by class threading._Condition?

-1 on this

IMHO just documenting the situation as it is would make more sense

--
nosy: +eli.bendersky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12960
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12960] threading.Condition is not a class

2011-09-14 Thread Nikolaus Rath

Nikolaus Rath nikol...@rath.org added the comment:

On 09/14/2011 04:29 AM, STINNER Victor wrote:
 
 STINNER Victor victor.stin...@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 rep...@bugs.python.org
http://bugs.python.org/issue12960
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12960] threading.Condition is not a class

2011-09-13 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 According to http://docs.python.org/library/threading.html#condition-objects, 
 threading.Condition is a class.

Nope, it's a factory, and it's written in the doc:

threading.Condition()
A factory function that returns a new condition variable object. A condition 
variable allows one or more threads to wait until they are notified by another 
thread.

See Condition Objects.

It has been changed in Python 3.3 (#10968): threading.Condition is now a class, 
instead of a factory.

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12960
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12960] threading.Condition is not a class

2011-09-13 Thread Nikolaus Rath

Nikolaus Rath nikol...@rath.org added the comment:

On 09/13/2011 07:41 PM, STINNER Victor wrote:
 
 STINNER Victor victor.stin...@haypocalc.com added the comment:
 
 According to 
 http://docs.python.org/library/threading.html#condition-objects, 
 threading.Condition is a class.
 
 Nope, it's a factory, and it's written in the doc:
 
 threading.Condition()
 A factory function that returns a new condition variable object. A condition 
 variable allows one or more threads to wait until they are notified by 
 another thread.
 
 See Condition Objects.

Yes, but further down it still says:


class threading.Condition([lock])

If the lock argument is given and not None, []


Best,

   -Nikolaus

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12960
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12960] threading.Condition is not a class

2011-09-11 Thread Nikolaus Rath

New submission from Nikolaus Rath nikol...@rath.org:

According to http://docs.python.org/library/threading.html#condition-objects, 
threading.Condition is a class. However, in fact it turns out to be function 
that constructs a _Condition instance.

I don't know the reason for that, but it seems to me that either Condition 
should be a class, or the reason for it being a function should be documented 
so that people who I would like to inherit from Conditionknow if that is not 
supported, or if they can safely inherit from _Condition instead.

--
assignee: docs@python
components: Documentation
messages: 143864
nosy: Nikratio, docs@python
priority: normal
severity: normal
status: open
title: threading.Condition is not a class
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12960
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com