-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Publicly expose Lib/dbm/__init__.py::__main__ as a script #114576
Copy link
Copy link
Open
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.type-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.type-featureA feature request or enhancementA feature request or enhancement
Projects
Status
In Progress
Bug report
Lib/dbm/__init__.pycontains a tinyif __name__ == "__main__"section that repeatedly callsdbm.whichdbon each of the given arguments:cpython/Lib/dbm/__init__.py
Lines 188 to 190 in 841eacd
Test session:
Some observations:
__main__.py; we must execute__init__.pyin order to run the scriptSuggesting either to:
__main__.py, add docs, add a simple argparse CLI, ...)Linked PRs