Issue 17205: In the help() function the order of methods changes (original) (raw)
Issue17205
Created on 2013-02-14 10:56 by py.user, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Messages (3) | | | | | | | | | | | | |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | | ------- | ----- | | ------- | ----- | | ------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| msg182086 - (view) | Author: py.user (py.user) * | Date: 2013-02-14 10:56 | | | | | | | | | | |
| >>> class A: ... '''class''' ... def c(self): ... '''c doc''' ... pass ... def b(self): ... '''b doc''' ... pass ... def a(self): ... '''a doc''' ... pass ... >>> help(A) class A(builtins.object) | class | | Methods defined here: | | a(self) | a doc | | b(self) | b doc | | c(self) | c doc | When I have many methods ordered in the source in readable order, the help() function is mixing them, so the last method goes to the top and the first method goes to the bottom. I would like to have an option, whether I want sort them or not. |
| msg182095 - (view) | Author: Ramchandra Apte (Ramchandra Apte) * | Date: 2013-02-14 13:30 | | | | | | | | | | |
| Sorry, but there is no way of telling the order as methods are respresented internally as a dictionary. Please close this as invalid. | | | | | | | | | | | | |
| msg182109 - (view) | Author: R. David Murray (r.david.murray) * | Date: 2013-02-14 16:14 | | | | | | | | | | |
| Ramchandra is correct. If you were to implement a "don't sort" flag, what you would get is *random* order (and a different order each time, in 3.3+). Further, this is Python-interpreter internal data structure we are talking about, so it isn't even an option to use OrderedDict in pydoc. I'm closing this as "won't fix" because it would certainly be nice to have this ability...but there is no practical way to implement it. | | | | | | | | | | | | |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:41 | admin | set | github: 61407 |
2013-02-14 16:14:56 | r.david.murray | set | status: open -> closednosy: + r.david.murraymessages: + resolution: wont fixstage: resolved |
2013-02-14 13:30:24 | Ramchandra Apte | set | nosy: + Ramchandra Aptemessages: + |
2013-02-14 10:56:30 | py.user | create |