[Python-ideas] Adding collections.abc.Ordered
Serhiy Storchaka
storchaka at gmail.com
Sun Nov 8 17:10:06 EST 2015
On 08.11.15 23:12, Sjoerd Job Postmus wrote:
> On 8 Nov 2015, at 20:06, Amir Rachum <amir at rachum.com
> <mailto:amir at rachum.com>> wrote:
>> As part of BasicStruct I intend to allow the use of mapping types as
>> __slots__, with the semantics of default values..
>> So it'll look something like this:
>>
>> class Point(BasicStruct):
>> __slots__ = {'x': 5, 'y': 7}
>
> So instead they'll write
> __slots__ = OrderedDict({'x': 5, 'y': 7})
> Causing the same issues?
Perhaps OrderedDict should reject unordered sources. Hey, here is yet
one use case!
More information about the Python-ideas
mailing list