[Python-Dev] PEP 359: The "make" Statement

Nicolas Fleury nidoizo at yahoo.com
Thu Apr 20 14:28:47 CEST 2006


Steven Bethard wrote:
> On 4/17/06, Russell E. Owen <rowen at cesmail.net> wrote:
>> At some point folks were discussing use cases of "make" where it was
>> important to preserve the order in which items were added to the
>> namespace.
>>
>> I'd like to suggest adding an implementation of an ordered dictionary to
>> standard python (e.g. as a library or built in type). It's inherently
>> useful, and in this case it could be used by "make".
> 
> Not to argue against adding an ordered dictionary somewhere to Python,
> but for the moment I've been convinced that it's not worth the
> complication to allow the dict in which the make-statement's block is
> executed to be customized.  The original use case had been
> XML-building, and there are much nicer solutions using the
> with-statement than there would be with the make-statement.  If you
> think you have a better (non-XML) use case though, I'm willing to
> reconsider it.

I use that to define C/C++ structures to be generated in Python.  I have 
to make some hacks to make that work with metaclasses, and I can't 
validate a copy-paste error that would produce two members of the same 
name (only the last one is kept).  Please reconsider it.

Regards,
Nicolas



More information about the Python-Dev mailing list