Message184092
I've looked into implementing the changes in the new version of the PEP. It seems, that currently type.__new__ copies the dict returned by __prepare__ (http://hg.python.org/cpython/file/55806d234653/Objects/typeobject.c#l2058). I think this means that some of the new examples wouldn't work ("Order preserving classes" and "Extending a class"). It also means, that currently it is impossible for two classes to share a namespace object (possibly this was the intention of copying the dict). So the "Note" in the PEP wouldn't be necessary (unless type.__new__ were modified).
I'm not sure if the PEP proposes to change this behavior of type.__new__ or not... |
|
Date |
User |
Action |
Args |
2013-03-13 17:08:17 | daniel.urban | set | recipients:
+ daniel.urban, jcea, ncoghlan, ezio.melotti, Arfrever, flox |
2013-03-13 17:08:17 | daniel.urban | set | messageid: <1363194497.3.0.900923115646.issue17044@psf.upfronthosting.co.za> |
2013-03-13 17:08:17 | daniel.urban | link | issue17044 messages |
2013-03-13 17:08:16 | daniel.urban | create | |
|