[issue8800] add threading.RWLock

2012-10-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: > We've already departed from that. Our Lock is nothing like a mutex, for > example (it's more of a binary semaphore). This is not by nature of good design, but an accident. C python needed both mutex and signaling ability and decided that a single non

[issue8800] add threading.RWLock

2012-10-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: > You are not restricted to the context manager model. Just use > selock.shared.acquire() or selock.exclusive.acquire(). The unlock operation is the same, so now you have to arbitrarily pick one of the "lockd" and chose release(). Why take a construc

[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2012-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: f = lambda t, c, *, _f=(lambda a, b, c: a + b + c): _f(*(unpack_tuple(2, t) + (c,))) def unpack_tuple(n, t): t = tuple(t) if len(t) > n: raise ValueError('too many values to unpack (expected %d)' % (n,)) if len(t) < n: raise ValueE

[issue16089] _elementtree causes segfault in GC

2012-10-02 Thread Stefan Krah
Stefan Krah added the comment: Nice find. -- The Python version does this: _Element = _ElementInterface = Element So (naively) I would think the same should be done for the C version after importing Element. But then one runs into the object layouts conflict that you mentioned. On the oth

[issue16106] antigravity tests

2012-10-02 Thread Christian Heimes
Christian Heimes added the comment: Ezio is as serious as the antigravity module. *g* -- nosy: +christian.heimes ___ Python tracker ___ __

[issue16105] Pass read only FD to signal.set_wakeup_fd

2012-10-02 Thread Charles-François Natali
Charles-François Natali added the comment: > I would not say that is a bug, but there is a write(wakeup_fd) call > with ignored return code and maybe this can be improved to an output > to stderr, or maybe a better solution. The problem is that it's called from the signal handler, so there's not

<    1   2