New submission from Cristobal Riaga <cristobalri...@gmail.com>:
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.) ---------- components: Library (Lib) messages: 402626 nosy: Patitotective priority: normal pull_requests: 26947 severity: normal status: open title: Inspect - Added sort_result parameter on getmembers function. versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45288> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com