Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.
This repository was archived by the owner on Nov 9, 2023. It is now read-only.

optparse vs argparse #248

@Jorge-C

Description

@Jorge-C

I've read some old discussions where an argparse backend is
mentioned, but I wonder why command line parsing is eventually
performed by optparse. It's deprecated in Python 2.7 (pyqi's only
supported version in master) and in Python 3.2 onwards.

The recommended replacement is argparse. PEP389, from 2009,
has information on why optparse was deprecated and argparse
introduced, and its advantages have been documented
elsewhere. For example, it doesn't need any of the hairy
stuff in core/interfaces/optparse/init.py:PyqiOption.

There's no expected time to have it removed from the
stdlib. Nonetheless, apart from the better features, error
messages, cleaner code... this is too new and shiny to be using
deprecated modules!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions