# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-29 21:40+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../Doc/howto/argparse-optparse.rst:7 msgid "Upgrading optparse code" msgstr "Mettre à jour du code ``optparse``" #: ../Doc/howto/argparse-optparse.rst:9 msgid "" "Originally, the :mod:`argparse` module had attempted to maintain " "compatibility with :mod:`optparse`. However, :mod:`optparse` was difficult " "to extend transparently, particularly with the changes required to support " "``nargs=`` specifiers and better usage messages. When most everything in :" "mod:`optparse` had either been copy-pasted over or monkey-patched, it no " "longer seemed practical to try to maintain the backwards compatibility." msgstr "" #: ../Doc/howto/argparse-optparse.rst:16 msgid "" "The :mod:`argparse` module improves on the :mod:`optparse` module in a " "number of ways including:" msgstr "" #: ../Doc/howto/argparse-optparse.rst:19 msgid "Handling positional arguments." msgstr "gère les arguments positionnels ;" #: ../Doc/howto/argparse-optparse.rst:20 msgid "Supporting subcommands." msgstr "" #: ../Doc/howto/argparse-optparse.rst:21 msgid "Allowing alternative option prefixes like ``+`` and ``/``." msgstr "" "permet d'utiliser les alternatives ``+`` ou ``/`` comme préfixes d'option ;" #: ../Doc/howto/argparse-optparse.rst:22 msgid "Handling zero-or-more and one-or-more style arguments." msgstr "prend en charge la répétition de valeurs (zéro ou plus, un ou plus) ;" #: ../Doc/howto/argparse-optparse.rst:23 msgid "Producing more informative usage messages." msgstr "fournit des messages d'aide plus complets ;" #: ../Doc/howto/argparse-optparse.rst:24 msgid "Providing a much simpler interface for custom ``type`` and ``action``." msgstr "" "fournit une interface plus simple pour les types et les actions " "personnalisés." #: ../Doc/howto/argparse-optparse.rst:26 msgid "A partial upgrade path from :mod:`optparse` to :mod:`argparse`:" msgstr "Le portage partiel d':mod:`optparse` à :mod:`argparse` :" #: ../Doc/howto/argparse-optparse.rst:28 msgid "" "Replace all :meth:`optparse.OptionParser.add_option` calls with :meth:" "`ArgumentParser.add_argument` calls." msgstr "" "remplacer tous les appels à :meth:`optparse.OptionParser.add_option` par des " "appels à :meth:`ArgumentParser.add_argument` ;" #: ../Doc/howto/argparse-optparse.rst:31 msgid "" "Replace ``(options, args) = parser.parse_args()`` with ``args = parser." "parse_args()`` and add additional :meth:`ArgumentParser.add_argument` calls " "for the positional arguments. Keep in mind that what was previously called " "``options``, now in the :mod:`argparse` context is called ``args``." msgstr "" "remplacer ``(options, args) = parser.parse_args()`` par ``args = parser." "parse_args()`` et ajouter des appels à :meth:`ArgumentParser.add_argument` " "pour les arguments positionnels. Prenez note que les valeurs précédemment " "appelées ``options`` sont appelées ``args`` dans le contexte d':mod:" "`argparse` ;" #: ../Doc/howto/argparse-optparse.rst:36 msgid "" "Replace :meth:`optparse.OptionParser.disable_interspersed_args` by using :" "meth:`~ArgumentParser.parse_intermixed_args` instead of :meth:" "`~ArgumentParser.parse_args`." msgstr "" "remplacer :meth:`optparse.OptionParser.disable_interspersed_args` en " "appelant :meth:`~ArgumentParser.parse_intermixed_args` plutôt que :meth:" "`~ArgumentParser.parse_args` ;" #: ../Doc/howto/argparse-optparse.rst:40 msgid "" "Replace callback actions and the ``callback_*`` keyword arguments with " "``type`` or ``action`` arguments." msgstr "" "remplacer les actions de rappel (*callback actions* en anglais) et les " "arguments nommés ``callback_*`` par des arguments ``type`` et ``actions`` ;" #: ../Doc/howto/argparse-optparse.rst:43 msgid "" "Replace string names for ``type`` keyword arguments with the corresponding " "type objects (e.g. int, float, complex, etc)." msgstr "" "remplacer les chaînes représentant le nom des types pour l'argument nommé " "``type`` par les objets types correspondants (par exemple : ``int``, " "``float``, ``complex``, etc) ;" #: ../Doc/howto/argparse-optparse.rst:46 msgid "" "Replace :class:`optparse.Values` with :class:`Namespace` and :exc:`optparse." "OptionError` and :exc:`optparse.OptionValueError` with :exc:`ArgumentError`." msgstr "" "remplacer :class:`optparse.Values` par :class:`Namespace` ; et :exc:" "`optparse.OptionError` et :exc:`optparse.OptionValueError` par :exc:" "`ArgumentError` ;" #: ../Doc/howto/argparse-optparse.rst:50 msgid "" "Replace strings with implicit arguments such as ``%default`` or ``%prog`` " "with the standard Python syntax to use dictionaries to format strings, that " "is, ``%(default)s`` and ``%(prog)s``." msgstr "" "remplacer les chaînes avec des arguments de formatage implicite (tels que " "``%default`` ou ``%prog``) par la syntaxe standard de Python pour " "l'interpolation d'un dictionnaire dans les chaînes de formatage (c'est-à-" "dire ``%(default)s`` et ``%(prog)s``) ;" #: ../Doc/howto/argparse-optparse.rst:54 msgid "" "Replace the OptionParser constructor ``version`` argument with a call to " "``parser.add_argument('--version', action='version', version='')``." msgstr "" "remplacer l'argument ``version`` du constructeur d'``OptionParser`` par un " "appel à ``parser.add_argument('--version', action='version', version='')``."