From b43a8688fe787dba66cbfb086594cdd6f311ed52 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 1 Jan 2021 14:21:20 +0100 Subject: [PATCH] docs: Correct argparse on short- options These aren't exposed as variables at all, so it's just entirely vestigial now and only kept for backwards compatibility. --- doc_src/cmds/argparse.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_src/cmds/argparse.rst b/doc_src/cmds/argparse.rst index d9b42dd09..5c44ce22c 100644 --- a/doc_src/cmds/argparse.rst +++ b/doc_src/cmds/argparse.rst @@ -74,7 +74,7 @@ Option Specifications Each option specification consists of: -- An optional alphanumeric short flag letter, followed by a ``/`` if the short flag can be used by someone invoking your command or a ``-`` if it should not be exposed as a valid short flag and the letter is just for the ``_flag_X`` variable. +- An optional alphanumeric short flag letter, followed by a ``/`` if the short flag can be used by someone invoking your command or, for backwards compatibility, a ``-`` if it should not be exposed as a valid short flag (in which case it will also not be exposed as a flag variable). - An optional long flag name. If not present then only the short flag letter can be used, and if that is not present either it's an error. @@ -97,7 +97,7 @@ Integer flag Sometimes commands take numbers directly as options, like ``foo -55``. To allow this one option spec can have the ``#`` modifier so that any integer will be understood as this flag, and the last number will be given as its value (as if ``=`` was used). -The ``#`` must follow the short flag letter (if any), and other modifiers like ``=`` are not allowed, except for ``-``:: +The ``#`` must follow the short flag letter (if any), and other modifiers like ``=`` are not allowed, except for ``-`` (for backwards compatibility):: m#maximum