Message277431
Both `WeakKeyDictionary` and `WeakValueDictionary` have opaque `__repr__` methods:
>>> x = weakref.WeakKeyDictionary({object: 2, type: 4,})
>>> x
<WeakKeyDictionary at 0x32e6198>
>>> dict(x)
{<class 'type'>: 4, <class 'object'>: 2}
This makes it annoying to view them at a glance. Is there a reason for it? (I don't know, maybe because they're weakref? Though I'm not sure how that would affect this decision.)
If there isn't a reason, then maybe there should be a nice `__repr__` that lets you see the objects inside? |
|
Date |
User |
Action |
Args |
2016-09-26 16:28:49 | cool-RR | set | recipients:
+ cool-RR |
2016-09-26 16:28:49 | cool-RR | set | messageid: <1474907329.42.0.213961169452.issue28278@psf.upfronthosting.co.za> |
2016-09-26 16:28:49 | cool-RR | link | issue28278 messages |
2016-09-26 16:28:49 | cool-RR | create | |
|