Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the help() function the order of methods changes #61407

Closed
py-user mannequin opened this issue Feb 14, 2013 · 3 comments
Closed

In the help() function the order of methods changes #61407

py-user mannequin opened this issue Feb 14, 2013 · 3 comments
Labels
docs Documentation in the Doc dir interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@py-user
Copy link
Mannequin

py-user mannequin commented Feb 14, 2013

BPO 17205
Nosy @bitdancer, @py-user

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2013-02-14.16:14:56.145>
created_at = <Date 2013-02-14.10:56:30.173>
labels = ['interpreter-core', 'type-feature', 'docs']
title = 'In the help() function the order of methods changes'
updated_at = <Date 2013-02-14.16:14:56.143>
user = 'https://github.com/py-user'

bugs.python.org fields:

activity = <Date 2013-02-14.16:14:56.143>
actor = 'r.david.murray'
assignee = 'docs@python'
closed = True
closed_date = <Date 2013-02-14.16:14:56.145>
closer = 'r.david.murray'
components = ['Documentation', 'Interpreter Core']
creation = <Date 2013-02-14.10:56:30.173>
creator = 'py.user'
dependencies = []
files = []
hgrepos = []
issue_num = 17205
keywords = []
message_count = 3.0
messages = ['182086', '182095', '182109']
nosy_count = 4.0
nosy_names = ['r.david.murray', 'docs@python', 'py.user', 'Ramchandra Apte']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue17205'
versions = ['Python 3.3']

@py-user
Copy link
Mannequin Author

py-user mannequin commented Feb 14, 2013

>>> 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.

@py-user py-user mannequin assigned docspython Feb 14, 2013
@py-user py-user mannequin added docs Documentation in the Doc dir interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Feb 14, 2013
@RamchandraApte
Copy link
Mannequin

RamchandraApte mannequin commented Feb 14, 2013

Sorry, but there is no way of telling the order as methods are respresented internally as a dictionary. Please close this as invalid.

@bitdancer
Copy link
Member

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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant