Author acue
Recipients acue, dstufft, eric.araujo
Date 2019-11-06.12:07:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The '' interface offers some global options, which could be queried. For example among numerous others the 'classifiers'.

The current implementation displays for example for the following call::

   python --description

The result::

  (3.8.0) $ python --description
   usage: [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
      or: --help [cmd1 cmd2 ...]
      or: --help-commands
      or: cmd --help

   error: no commands supplied
   (3.8.0) $ echo $?
   (3.8.0) $

I would like to propose some minor enhancements here.

1. The error message is here an error itself, because the
   query was flawless successful.

   This is due to the implementation by relying on an
   exception for the termination condition, when no
   command was given. This is for the global query options
   for the global metadata perfectly allright.

   Thus the error message must not occur.

2. The resulting exit code of '1' is due to the same execption
   for the missing command.

   Thus the exit code must be '0' on Posix based and alike

3. The usage message, which is also based on a private method,
   is basically an error itself. This is due to the fact, that
   actually nothing has failed.

   Thus the usage message must not be displayed here.

4. I also would like to propose some layout enhancements at
   this occasion.

   The  value of the queried attribute - here the description,
   should be separated by a <CR>.
   E.g. by 'USAGE', or 'global_+usage()' within 'distutils.core'.

   The resulting layout and exit value  would be:

      (3.8.0) $ python --description


      (3.8.0) $ echo $?
      (3.8.0) $
Date User Action Args
2019-11-06 12:07:59acuesetrecipients: + acue, eric.araujo, dstufft
2019-11-06 12:07:59acuesetmessageid: <>
2019-11-06 12:07:59acuelinkissue38718 messages
2019-11-06 12:07:58acuecreate