[Python-Dev] Preserving the definition order of class namespaces. (original) (raw)
Guido van Rossum guido at python.org
Sun May 24 07:32:27 CEST 2015
- Previous message (by thread): [Python-Dev] Preserving the definition order of class namespaces.
- Next message (by thread): [Python-Dev] Preserving the definition order of class namespaces.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
But isn't that also a problem? It would make the existence of that member a bit unpredictable.
On Saturday, May 23, 2015, Larry Hastings <larry at hastings.org> wrote:
On 05/23/2015 09:46 PM, Guido van Rossum wrote: How will definitionorder be set in the case where prepare doesn't return an OrderedDict? Or where a custom metaclass's new calls its superclass's new with a plain dict? (I just wrote some code that does that. :-) In his patch, typenew tests to see if the dict passed in is an ordered dict (PyODictCheck). definitionorder is only created and populated if it passes the test. http://bugs.python.org/file39446/odict-class-definition-namespace.diff /arry
-- --Guido van Rossum (on iPad) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150523/73652ffc/attachment-0001.html>
- Previous message (by thread): [Python-Dev] Preserving the definition order of class namespaces.
- Next message (by thread): [Python-Dev] Preserving the definition order of class namespaces.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]