add docs for argparse.boolean

added entry to changelog as well.
develop
Andriel Chaoti 2023-09-09 14:30:20 -06:00
parent 85cd0cd01c
commit 652349c7e7
No known key found for this signature in database
GPG Key ID: CF7EA34A68224617
2 changed files with 7 additions and 0 deletions

@ -64,6 +64,7 @@ Template for new versions:
## API
## Lua
- ``argparse.boolean``: convert arguments to lua boolean values.
## Removed

@ -3538,6 +3538,12 @@ parameters.
``tonumber(arg)``. If ``arg_name`` is specified, it is used to make error
messages more useful.
* ``argparse.boolean(arg, arg_name)``
Converts ``string.lower(arg)`` from "yes/no/on/off/true/false/etc..." to a lua
boolean. Throws if the value can't be converted, otherwise returns
``true``/``false``. If ``arg_name`` is specified, it is used to make error
messages more useful.
dumper
======