[issue46466] help function reads comments

2022-01-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: That's not a bug. https://docs.python.org/3/library/pydoc.html "If there is no docstring, pydoc tries to obtain a description from the block of comment lines just above the definition of the class, function or method in the source file, or at the top of

[issue46466] help function reads comments

2022-01-21 Thread David Mc Dougall
Change by David Mc Dougall : -- nosy: -dam1784 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46466] help function reads comments

2022-01-21 Thread David Mc Dougall
New submission from David Mc Dougall : My inline comment ('#') got picked up by the help command. Write the following code to a file (I named it "reproducer.py"): """ class Foo: # Hello docstring, I'm a '#' comment! def bar(self): pass assert Foo.bar.__doc__ is None