PEP 359: The "make" Statement

Nicolas Fleury nid_oizo at yahoo.com_removethe_
Thu Apr 13 23:17:56 EDT 2006


Steven Bethard wrote:
> Ok, I finally have a PEP number.  Here's the most updated version of the 
> "make" statement PEP.  I'll be posting it shortly to python-dev.
> 
> Thanks again for the previous discussion and suggestions!

I find it very interesting.

My only complaint is that it is limited to things that can be described 
as a namespace, where the order of declaration is lost.  This problem is 
also true with metaclasses, but it is more acceptable since they are for 
classes.

For example, it would be nice to use such a feature to define C 
structures that are to be exported in a binary format without having to 
use a hidden counter or other hacks.  I have no idea of the 
implementation implications, but it would be nice to have the capability 
to override the namespace type to use something else than dict, so that 
it can be filled with symbols one statement at a time.

The callable could have something like a __namespacetype__ that could be 
use instead of dict.  That type would have to implement __setitem__.

Regards,
Nicolas



More information about the Python-list mailing list