This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cool-RR
Recipients cool-RR
Date 2016-09-26.16:28:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1474907329.42.0.213961169452.issue28278@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2016-09-26 16:28:49cool-RRsetrecipients: + cool-RR
2016-09-26 16:28:49cool-RRsetmessageid: <1474907329.42.0.213961169452.issue28278@psf.upfronthosting.co.za>
2016-09-26 16:28:49cool-RRlinkissue28278 messages
2016-09-26 16:28:49cool-RRcreate