[issue8983] Docstrings should refer to help(name), not name.__doc__

2010-08-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r84106. I left the __init__ docstring issue unresolved because it is orthogonal to the name.__doc__ vs. help(name) issue here. With redundant help(type(x)), the meaning of the docstring is not changed. I am leaving docstrings on magic meth

[issue8983] Docstrings should refer to help(name), not name.__doc__

2010-06-12 Thread Éric Araujo
Éric Araujo added the comment: 1. For old-style class instances, both help(i) and help(type(i)) give the help for the instance type, which is highly unhelpful IMO. Otherwise it seems than both C class instances and regular Python new-style class instances give the class doc for help(i). Summa

[issue8983] Docstrings should refer to help(name), not name.__doc__

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attaching issue8983.diff patch. I am a bit unsure about __init__ docstring change: 1. Are cases when help(type(x)) differs from help(x) important enough to distinguish in docstring? 2. Do we need a default docstring on __init__ at all? If so, should

[issue8983] Docstrings should refer to help(name), not name.__doc__

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Will do. -- assignee: d...@python -> belopolsky ___ Python tracker ___ ___ Python-bugs-list ma

[issue8983] Docstrings should refer to help(name), not name.__doc__

2010-06-12 Thread Georg Brandl
Georg Brandl added the comment: I agree, help(obj) is the better advice. Would you prepare a patch? -- nosy: +georg.brandl ___ Python tracker ___ ___

[issue8983] Docstrings should refer to help(name), not name.__doc__

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: A couple more: $ grep -in "see.*\.__doc__" Lib/*.py Lib/doctest.py:1782:See doctest.__doc__ for an overview. Lib/inspect.py:162:See isfunction.__doc__ for attributes listing.""" an a really problematic Objects/typeobject.c:5529: "see x

[issue8983] Docstrings should refer to help(name), not name.__doc__

2010-06-12 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Inspired by issue issue8973, I did $ grep -in "see.*\.__doc__" Modules/*.c Surprisingly, there were not as many results as I feared. As I explained in the referenced issue, "See name.__doc__", while technically correct, is not user friendly. If yo