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 llllllllll
Recipients llllllllll
Date 2016-06-21.02:17:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1466475427.25.0.285635253324.issue27359@psf.upfronthosting.co.za>
In-reply-to
Content
This proposes the following syntax for creating OrderedDict literals:

OrderedDict[k1: v1, k2: v2, ...]

This is implemented by putting a metaclass on OrderedDict which has a getitem that turns the slices into a list of tuples (after validation).

The idea is taken from the library datashape where we have done this to implement pseudo literals for the Record type.

This is marked as  WIP because I am not quite sure why, but this patch is causing subclasses of OrderedDict to segfault in PyObject_SetItem.
History
Date User Action Args
2016-06-21 02:17:07llllllllllsetrecipients: + llllllllll
2016-06-21 02:17:07llllllllllsetmessageid: <1466475427.25.0.285635253324.issue27359@psf.upfronthosting.co.za>
2016-06-21 02:17:07lllllllllllinkissue27359 messages
2016-06-21 02:17:06llllllllllcreate