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 bup
Recipients bup
Date 2017-09-23.20:29:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506198550.29.0.696605972166.issue31563@psf.upfronthosting.co.za>
In-reply-to
Content
They behave like sets yet their repr looks like a list: dict_keys([0, 1, 3, 4]). It should be dict_keys({0, 1, 2, 3, 4}). Ditto for odict_keys/odict_values. Maybe this is a holdover from when the repr of sets was Set([0, 1, 2, ...])?

The reason I bring this up is that they behave like sets was one of the last things I learned. I learned about stuff like abcs, metaclasses (including stuff like __prepare__ and __init_subclass__) and memorized practically all of the standard library long before I realized this.

I don't think it would break anything to do this and it could help dummies like me realize their set-like behavior sooner.

It might also be nice to give them the explicit `symmetric_difference`, `union`, and `intersection` methods in addition to the respective `__xor__`, `__or__`, and `__and__` methods.
History
Date User Action Args
2017-09-23 20:29:10bupsetrecipients: + bup
2017-09-23 20:29:10bupsetmessageid: <1506198550.29.0.696605972166.issue31563@psf.upfronthosting.co.za>
2017-09-23 20:29:10buplinkissue31563 messages
2017-09-23 20:29:10bupcreate