Message244917
| Author |
serhiy.storchaka |
| Recipients |
berker.peksag, brett.cannon, larry, pitrou, rhettinger, serhiy.storchaka |
| Date |
2015年06月06日.15:42:01 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1433605322.28.0.588436344697.issue24391@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Here is updated patch. Now the repr always starts with the qualified class name.
<threading.Semaphore: 10 at 0xb710ec8c>
<threading.BoundedSemaphore: 7/10 at 0xb6ff1d6c>
<threading.Event: unset at 0xb710ec8c>
<threading.Event: set at 0xb710ec8c>
<threading.Barrier: 0/10 at 0xb6ff1d6c>
<threading.Barrier: 3/10 at 0xb6ff1d6c>
<threading.Barrier: 0/10, broken at 0xb6ff1d6c>
But there is other question. Should reprs be consistent with reprs of corresponding classes in multiprocessing and asyncio modules?
In multiprocessing:
<Semaphore(value=10)>
<BoundedSemaphore(value=10, maxvalue=10)>
In asyncio:
<asyncio.locks.Event object at 0xb6fa180c [unset]>
<asyncio.locks.Event object at 0xb6fa180c [set]>
<asyncio.locks.Event object at 0xb6fa180c [unset,waiters:3]>
<asyncio.locks.Semaphore object at 0xb6cec26c [unlocked,value:10]>
<asyncio.locks.Semaphore object at 0xb6cec26c [locked]>
<asyncio.locks.Semaphore object at 0xb6cec26c [locked, waiters:3]> |
|