[Python-3000] Change to class construction?
Phillip J. Eby
pje at telecommunity.com
Tue Jul 10 02:13:56 CEST 2007
At 11:56 PM 7/9/2007 +0300, Guido van Rossum wrote:
> The use of the word "mapping"
>might easily be construed as implementing abc.Mapping, and then
>iteration and reading the contents would be well-defined.
I'm not sure which use of the word "mapping" you're talking
about. PEP 3115 is explicit that there is no specific requirements
for the __prepare__()'d namespace; it just mentions some things that
might be useful to have in such an object.
So, in order to replace it with a view or something, we'd want to
change the PEP to explicitly document what is required.
Personally, I'd just as soon make it explicitly official that
locals() in a class suite gives you the __prepare__()'d object,
whatever it is. If a given Python implementation can support PEP
3115 in the first place, then it clearly knows what object to return. ;-)
More information about the Python-3000
mailing list