[Python-ideas] Modify inspect.getmembers() to return object members in source code order
random832 at fastmail.us
random832 at fastmail.us
Mon Mar 16 01:23:53 CET 2015
On Sun, Mar 15, 2015, at 20:08, Chris Angelico wrote:
> I'm not sure that that's really possible, unless you also are
> proposing that OrderedDict be used internally instead of a regular
> dict for all namespaces. That information doesn't exist.
There are dict implementations where all items that were added with no
deletions starting from when the dict was empty will be returned by
iteration in the order they were originally added. Adding such an
implementation (or changing dict itself to have this guarantee) and
using it for various things like keyword args is perennially suggested.
More information about the Python-ideas
mailing list