Eric Snow added the comment:

Here's a patch that drops adding __definition_order__.  You can get the same 
effect by adding `__definition_order__ = list(locals())` at the bottom of your 
class definition.  The benefit of having `__definition_order__` is that the 
information is automatically available for later use rather than forcing the 
class author to add the above line in order to benefit from external 
introspection/manipulation.  The downside is that every syntax-defined class 
will have the extra attribute with the list of definition order, which might be 
an unnecessary waste, even if not a huge one.

Ultimately, I'd prefer to keep `__definition_order__`.

----------
Added file: http://bugs.python.org/file39456/just-default-to-odict.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24254>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to