[issue45288] Inspect - Added sort_result parameter on getmembers function.

Serhiy Storchaka report at bugs.python.org
Sat Sep 25 13:31:49 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

But you will not get them in creation order, even if omit the final sort, because:

1. dir() returns names sorted alphabetically, not in order of creation.
2. Dynamic class attributes are added at the end, and inherited attributes follow attributes defined in that class.

So adding this parameter will not help you.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45288>
_______________________________________


More information about the Python-bugs-list mailing list