[Python-ideas] Ordered storage of keyword arguments

Carl M. Johnson cmjohnson.mailinglist at gmail.com
Fri Oct 29 10:50:26 CEST 2010


On Thu, Oct 28, 2010 at 10:30 PM, M.-A. Lemburg <mal at egenix.com> wrote:

> If it were easier to access this order, a lot of the extra magic
> needed to map fixed order records to Python classes could go
> away.

But, pending the creation of an odict of equal or greater speed, is
there any reason we can't just make due for now by having the
__prepare__ method of our relevant metaclasses return an odict? Sure,
in Python 2 people used to have to do crazy stack frame hacks and such
to preserve the ordering info for their ORMs, but now that we have
__prepare__, I don't think the need for a better solution is
particularly urgent. I agree it might be nice to have odicts
everywhere, but it wouldn't be so nice that we need to sacrifice
performance for it at the moment.

Let someone forge the bell first, then we can talk about getting the
cat to wear it.



More information about the Python-ideas mailing list