Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Undeprecate getopt and optparse #126180

Closed
Labels
docsDocumentation in the Doc dirtype-featureA feature request or enhancement
@serhiy-storchaka

Description

@serhiy-storchaka

See discussion athttps://discuss.python.org/t/getopt-and-optparse-vs-argparse/69618. Seems that all support this.

argparse has many issues, some are fundamental and cannot be easily worked around. Its implements behavior different from the behavior of other Unix/Linux programs in subtle ways. It is still not mature to be the preferable Python module for CLI.

getopt is a de-facto cross-language standard. Many programmers that came from other programming languges are already familiar with it. It is very simple, so even if there are other CLI modules, it should be left in the stdlib.

optparse provides an object-oriented interface. Even if it has less features thanargparse, it is more stable and has less bugs. It should be the preferable Python module for CLI.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirtype-featureA feature request or enhancement

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp