Message268954
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. |
|
Date |
User |
Action |
Args |
2016-06-21 02:17:07 | llllllllll | set | recipients:
+ llllllllll |
2016-06-21 02:17:07 | llllllllll | set | messageid: <1466475427.25.0.285635253324.issue27359@psf.upfronthosting.co.za> |
2016-06-21 02:17:07 | llllllllll | link | issue27359 messages |
2016-06-21 02:17:06 | llllllllll | create | |
|