[Python-ideas] Why does BoundArguments use an OrderedDict?
Eric Snow
ericsnowcurrently at gmail.com
Wed Dec 17 22:26:25 CET 2014
BTW, thanks for the feedback. :)
On Wed, Dec 17, 2014 at 11:30 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> Other reservations:
>
> - why aren't the linked list pointers not included in the hash entries?
> that should simplify some logic quite a bit
I'll look into that. If I recall correctly this came up in earlier
discussion and there was a justification.
> - is it useful to keep the shared / split keys mechanism? shared keys
> are mostly useful for instance dicts
I'm pretty sure this is an artifact of subclassing dict.
> - does it have to inherit from dict? that looks like a potential can of
> worms
One of the constraints here is to make the C implementation of
OrderedDict match the API of the Python type exactly and the
underlying implementation as closely as reasonable. The Python type
subclasses dict so the C implementation does as well.
FWIW (and not directed to Antoine specifically), the implementation up
for review may not be ideal, but it exists and is complete. :)
Barring any substantial concerns during review (and the points Antoine
has brought up), I would rather the patch landed than wait
indefinitely for a more ideal implementation. That could happen
afterward, though I'm fairly confident in the correctness and
efficiency of the implementation.
-eric
More information about the Python-ideas
mailing list