Skip to content

Use argparse in timeit #137944

@picnixz

Description

@picnixz

Proposal:

timeit currently uses getopt, and the __main__ code is a bit messy (see #137587). As such, I'm suggesting that we move to argparse instead. The --help contains the entire module's docstring which I believe could be truncated (for instance, it includes the classes and functions that are available in the module).

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions