This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: In the argparse help(argparse) prints weird comments instead of good docstrings
Type: behavior Stage: resolved
Components: Documentation, Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: docs@python Nosy List: LewisGaul, aeros, docs@python, py.user, rhettinger
Priority: normal Keywords:

Created on 2016-09-07 03:20 by py.user, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg274738 - (view) Author: py.user (py.user) * Date: 2016-09-07 03:20
>>> import argparse
>>> help(argparse)

>>>

Output:

|  add_subparsers(self, **kwargs)
|      # ==================================
|      # Optional/Positional adding methods
|      # ==================================
|  
|  convert_arg_line_to_args(self, arg_line)
|  
|  error(self, message)
|      error(message: string)
|      
|      Prints a usage message incorporating the message to stderr and
|      exits.
|      
|      If you override this in a subclass, it should not return -- it
|      should either exit or raise an exception.
|  
|  exit(self, status=0, message=None)
|      # ===============
|      # Exiting methods
|      # ===============
|  
|  format_help(self)
|  
|  format_usage(self)
|      # =======================
|      # Help-formatting methods
|      # =======================
|  
|  parse_args(self, args=None, namespace=None)
|      # =====================================
|      # Command line argument parsing methods
|      # =====================================
|  
|  parse_known_args(self, args=None, namespace=None)
|  
|  print_help(self, file=None)
|  
|  print_usage(self, file=None)
|      # =====================
|      # Help-printing methods
|      # =====================
|  
|  ----------------------------------------------------------------------
|  Methods inherited from _AttributeHolder:
...


There are no docstrings for methods, hence some internal comments picked up instead.
msg355995 - (view) Author: Lewis Gaul (LewisGaul) * Date: 2019-11-05 01:31
This doesn't seem to be the case [anymore] to me, should this be closed?
History
Date User Action Args
2022-04-11 14:58:35adminsetgithub: 72181
2019-11-05 02:17:21rhettingersetstatus: open -> closed
nosy: + rhettinger

resolution: out of date
stage: resolved
2019-11-05 01:31:59LewisGaulsetnosy: + aeros
2019-11-05 01:31:45LewisGaulsetnosy: + LewisGaul
messages: + msg355995
2016-09-07 03:20:28py.usercreate