Skip to content

Commit 59190aa

Browse files
Get changes from CPython Doc for 3.12
1 parent 529c7a0 commit 59190aa

File tree

1 file changed

+118
-0
lines changed

1 file changed

+118
-0
lines changed

howto/argparse-optparse.po

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) 2001-2024, Python Software Foundation
3+
# This file is distributed under the same license as the Python package.
4+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5+
#
6+
#, fuzzy
7+
msgid ""
8+
msgstr ""
9+
"Project-Id-Version: Python 3.12\n"
10+
"Report-Msgid-Bugs-To: \n"
11+
"POT-Creation-Date: 2024-11-01 00:21+0000\n"
12+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14+
"Language-Team: LANGUAGE <[email protected]>\n"
15+
"MIME-Version: 1.0\n"
16+
"Content-Type: text/plain; charset=UTF-8\n"
17+
"Content-Transfer-Encoding: 8bit\n"
18+
19+
#: howto/argparse-optparse.rst:7
20+
msgid "Upgrading optparse code"
21+
msgstr ""
22+
23+
#: howto/argparse-optparse.rst:9
24+
msgid ""
25+
"Originally, the :mod:`argparse` module had attempted to maintain "
26+
"compatibility with :mod:`optparse`. However, :mod:`optparse` was difficult "
27+
"to extend transparently, particularly with the changes required to support "
28+
"``nargs=`` specifiers and better usage messages. When most everything in :"
29+
"mod:`optparse` had either been copy-pasted over or monkey-patched, it no "
30+
"longer seemed practical to try to maintain the backwards compatibility."
31+
msgstr ""
32+
33+
#: howto/argparse-optparse.rst:16
34+
msgid ""
35+
"The :mod:`argparse` module improves on the :mod:`optparse` module in a "
36+
"number of ways including:"
37+
msgstr ""
38+
39+
#: howto/argparse-optparse.rst:19
40+
msgid "Handling positional arguments."
41+
msgstr ""
42+
43+
#: howto/argparse-optparse.rst:20
44+
msgid "Supporting subcommands."
45+
msgstr ""
46+
47+
#: howto/argparse-optparse.rst:21
48+
msgid "Allowing alternative option prefixes like ``+`` and ``/``."
49+
msgstr ""
50+
51+
#: howto/argparse-optparse.rst:22
52+
msgid "Handling zero-or-more and one-or-more style arguments."
53+
msgstr ""
54+
55+
#: howto/argparse-optparse.rst:23
56+
msgid "Producing more informative usage messages."
57+
msgstr ""
58+
59+
#: howto/argparse-optparse.rst:24
60+
msgid "Providing a much simpler interface for custom ``type`` and ``action``."
61+
msgstr ""
62+
63+
#: howto/argparse-optparse.rst:26
64+
msgid "A partial upgrade path from :mod:`optparse` to :mod:`argparse`:"
65+
msgstr ""
66+
67+
#: howto/argparse-optparse.rst:28
68+
msgid ""
69+
"Replace all :meth:`optparse.OptionParser.add_option` calls with :meth:"
70+
"`ArgumentParser.add_argument` calls."
71+
msgstr ""
72+
73+
#: howto/argparse-optparse.rst:31
74+
msgid ""
75+
"Replace ``(options, args) = parser.parse_args()`` with ``args = parser."
76+
"parse_args()`` and add additional :meth:`ArgumentParser.add_argument` calls "
77+
"for the positional arguments. Keep in mind that what was previously called "
78+
"``options``, now in the :mod:`argparse` context is called ``args``."
79+
msgstr ""
80+
81+
#: howto/argparse-optparse.rst:36
82+
msgid ""
83+
"Replace :meth:`optparse.OptionParser.disable_interspersed_args` by using :"
84+
"meth:`~ArgumentParser.parse_intermixed_args` instead of :meth:"
85+
"`~ArgumentParser.parse_args`."
86+
msgstr ""
87+
88+
#: howto/argparse-optparse.rst:40
89+
msgid ""
90+
"Replace callback actions and the ``callback_*`` keyword arguments with "
91+
"``type`` or ``action`` arguments."
92+
msgstr ""
93+
94+
#: howto/argparse-optparse.rst:43
95+
msgid ""
96+
"Replace string names for ``type`` keyword arguments with the corresponding "
97+
"type objects (e.g. int, float, complex, etc)."
98+
msgstr ""
99+
100+
#: howto/argparse-optparse.rst:46
101+
msgid ""
102+
"Replace :class:`optparse.Values` with :class:`Namespace` and :exc:`optparse."
103+
"OptionError` and :exc:`optparse.OptionValueError` with :exc:`ArgumentError`."
104+
msgstr ""
105+
106+
#: howto/argparse-optparse.rst:50
107+
msgid ""
108+
"Replace strings with implicit arguments such as ``%default`` or ``%prog`` "
109+
"with the standard Python syntax to use dictionaries to format strings, that "
110+
"is, ``%(default)s`` and ``%(prog)s``."
111+
msgstr ""
112+
113+
#: howto/argparse-optparse.rst:54
114+
msgid ""
115+
"Replace the OptionParser constructor ``version`` argument with a call to "
116+
"``parser.add_argument('--version', action='version', version='<the "
117+
"version>')``."
118+
msgstr ""

0 commit comments

Comments
 (0)