This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Patitotective
Recipients Patitotective
Date 2021-09-25.14:28:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632580104.8.0.617180207375.issue45288@roundup.psfhosted.org>
In-reply-to
Content
Added `sort_result` parameter (`bool=True`)  on `getmembers` function inside `Lib/inspect.py`, that, as it name says, allows you to `getmembers` result without sorting it.
I'm needed of this and it seems impossible to achieve because of [`367` line](https://github.com/python/cpython/blob/3.9/Lib/inspect.py#L367): 
```py
results.sort(key=lambda pair: pair[0])
```
Any other solution is very welcomed.

(I need it because I'm working on an [API Reference creator](https://github.com/Patitotective/PyAPIReference) and I think it would be better if it the members are ordered in the same order you define them.)
History
Date User Action Args
2021-09-25 14:28:24Patitotectivesetrecipients: + Patitotective
2021-09-25 14:28:24Patitotectivesetmessageid: <1632580104.8.0.617180207375.issue45288@roundup.psfhosted.org>
2021-09-25 14:28:24Patitotectivelinkissue45288 messages
2021-09-25 14:28:24Patitotectivecreate