1
0
Fork 0
python-docs-fr/library/numbers.po

279 lines
12 KiB
Plaintext
Raw Permalink Normal View History

2018-07-04 09:06:45 +00:00
# Copyright (C) 2001-2018, Python Software Foundation
2018-07-04 09:08:42 +00:00
# For licence information, see README file.
2016-10-30 09:46:26 +00:00
#
msgid ""
msgstr ""
2019-12-05 22:15:54 +00:00
"Project-Id-Version: Python 3\n"
2016-10-30 09:46:26 +00:00
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-01-15 22:33+0100\n"
"PO-Revision-Date: 2021-12-16 17:25+0100\n"
2019-05-30 21:42:39 +00:00
"Last-Translator: Julien Palard <julien@palard.fr>\n"
2018-07-04 09:14:25 +00:00
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
2017-05-23 22:40:56 +00:00
"Language: fr\n"
2016-10-30 09:46:26 +00:00
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: library/numbers.rst:2
2016-10-30 09:46:26 +00:00
msgid ":mod:`numbers` --- Numeric abstract base classes"
2019-05-30 21:42:39 +00:00
msgstr ":mod:`numbers` — Classes de base abstraites numériques"
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:7
2016-10-30 09:46:26 +00:00
msgid "**Source code:** :source:`Lib/numbers.py`"
2019-05-30 21:42:39 +00:00
msgstr "**Code source :** :source:`Lib/numbers.py`"
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:11
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"The :mod:`numbers` module (:pep:`3141`) defines a hierarchy of numeric :term:"
"`abstract base classes <abstract base class>` which progressively define "
"more operations. None of the types defined in this module are intended to "
"be instantiated."
2016-10-30 09:46:26 +00:00
msgstr ""
"Le module :mod:`numbers` (:pep:`3141`) définit une hiérarchie de :term:"
"`classes de base abstraites<abstract base class>` numériques qui définissent "
"progressivement plus d'opérations. Aucun des types définis dans ce module ne "
"peut être instancié."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:18
2016-10-30 09:46:26 +00:00
msgid ""
"The root of the numeric hierarchy. If you just want to check if an argument "
"*x* is a number, without caring what kind, use ``isinstance(x, Number)``."
msgstr ""
"La base de la hiérarchie numérique. Si vous voulez juste vérifier qu'un "
"argument *x* est un nombre, peu importe le type, utilisez ``isinstance(x, "
"Number)``."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:23
2016-10-30 09:46:26 +00:00
msgid "The numeric tower"
msgstr "La tour numérique"
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:27
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"Subclasses of this type describe complex numbers and include the operations "
"that work on the built-in :class:`complex` type. These are: conversions to :"
"class:`complex` and :class:`bool`, :attr:`.real`, :attr:`.imag`, ``+``, ``-"
"``, ``*``, ``/``, ``**``, :func:`abs`, :meth:`conjugate`, ``==``, and ``!"
"=``. All except ``-`` and ``!=`` are abstract."
2016-10-30 09:46:26 +00:00
msgstr ""
"Les sous-classes de ce type décrivent des nombres complexes et incluent les "
"opérations qui fonctionnent sur le type natif :class:`complex`. Ce sont : "
"les conversions vers :class:`complex` et :class:`bool`, :attr:`.real`, :attr:"
"`.imag`, ``+``, ``-``, ``*``, ``/``, :func:`abs`, :meth:`conjugate`, ``==`` "
"et ``!=``. Toutes sauf ``-`` et ``!=`` sont abstraites."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:35
2016-10-30 09:46:26 +00:00
msgid "Abstract. Retrieves the real component of this number."
msgstr "Abstrait. Récupère la partie réelle de ce nombre."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:39
2016-10-30 09:46:26 +00:00
msgid "Abstract. Retrieves the imaginary component of this number."
2019-05-30 21:42:39 +00:00
msgstr "Abstrait. Retrouve la partie imaginaire de ce nombre."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:43
2016-10-30 09:46:26 +00:00
msgid ""
"Abstract. Returns the complex conjugate. For example, ``(1+3j).conjugate() "
"== (1-3j)``."
msgstr ""
2019-05-30 21:42:39 +00:00
"Abstrait. Renvoie le complexe conjugué. Par exemple, ``(1+3j).conjugate() == "
"(1-3j)``."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:48
2016-10-30 09:46:26 +00:00
msgid ""
"To :class:`Complex`, :class:`Real` adds the operations that work on real "
"numbers."
msgstr ""
":class:`Real` ajoute les opérations qui fonctionnent sur les nombres réels "
"à :class:`Complex`."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:51
2016-10-30 09:46:26 +00:00
msgid ""
"In short, those are: a conversion to :class:`float`, :func:`math.trunc`, :"
"func:`round`, :func:`math.floor`, :func:`math.ceil`, :func:`divmod`, ``//``, "
"``%``, ``<``, ``<=``, ``>``, and ``>=``."
msgstr ""
2019-05-30 21:42:39 +00:00
"En bref, celles-ci sont : une conversion vers :class:`float`, :func:`math."
"trunc`, :func:`round`, :func:`math.floor`, :func:`math.ceil`, :func:"
2019-05-30 21:42:39 +00:00
"`divmod`, ``//``, ``%``, ``<``, ``<=``, ``>`` et ``>=``."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:55
2016-10-30 09:46:26 +00:00
msgid ""
"Real also provides defaults for :func:`complex`, :attr:`~Complex.real`, :"
"attr:`~Complex.imag`, and :meth:`~Complex.conjugate`."
msgstr ""
"*Real* fournit également des valeurs par défaut pour :func:`complex`, :attr:"
2019-05-30 21:42:39 +00:00
"`~Complex.real`, :attr:`~Complex.imag` et :meth:`~Complex.conjugate`."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:61
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"Subtypes :class:`Real` and adds :attr:`~Rational.numerator` and :attr:"
"`~Rational.denominator` properties. It also provides a default for :func:"
"`float`."
msgstr ""
"Dérive :class:`Real` et ajoute les propriétés :attr:`~Rational.numerator` "
"et :attr:`~Rational.denominator` qui doivent être les plus petits possible. "
"Avec celles-ci, il fournit une valeur par défaut pour :func:`float`."
#: library/numbers.rst:65
#, fuzzy
msgid ""
"The :attr:`~Rational.numerator` and :attr:`~Rational.denominator` values "
"should be instances of :class:`Integral` and should be in lowest terms with :"
"attr:`~Rational.denominator` positive."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-05-30 21:42:39 +00:00
"Dérive :class:`Real` et ajoute les propriétés :attr:`~Rational.numerator` "
"et :attr:`~Rational.denominator` qui doivent être les plus petits possible. "
"Avec celles-ci, il fournit une valeur par défaut pour :func:`float`."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:75
2016-10-30 09:46:26 +00:00
msgid "Abstract."
2019-05-30 21:42:39 +00:00
msgstr "Abstrait."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:80
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"Subtypes :class:`Rational` and adds a conversion to :class:`int`. Provides "
"defaults for :func:`float`, :attr:`~Rational.numerator`, and :attr:"
"`~Rational.denominator`. Adds abstract methods for :func:`pow` with modulus "
"and bit-string operations: ``<<``, ``>>``, ``&``, ``^``, ``|``, ``~``."
2016-10-30 09:46:26 +00:00
msgstr ""
2019-05-30 21:42:39 +00:00
"Dérive :class:`Rational` et ajoute une conversion en :class:`int`. Fournit "
"des valeurs par défaut pour :func:`float`, :attr:`~Rational.numerator` et :"
"attr:`~Rational.denominator`. Ajoute des méthodes abstraites pour ``**`` et "
"les opérations au niveau des bits: ``<<``, ``>>``, ``&``, ``^``, ``|``, "
"``~``."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:88
2016-10-30 09:46:26 +00:00
msgid "Notes for type implementors"
msgstr "Notes pour implémenter des types"
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:90
2016-10-30 09:46:26 +00:00
msgid ""
"Implementors should be careful to make equal numbers equal and hash them to "
"the same values. This may be subtle if there are two different extensions of "
"the real numbers. For example, :class:`fractions.Fraction` implements :func:"
"`hash` as follows::"
msgstr ""
"Les développeurs doivent veiller à ce que des nombres égaux soient bien "
"égaux lors de comparaisons et à ce qu'ils soient hachés aux mêmes valeurs. "
"Cela peut être subtil s'il y a deux dérivations différentes des nombres "
"réels. Par exemple, :class:`fractions.Fraction` implémente :func:`hash` "
"comme suit ::"
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:109
2016-10-30 09:46:26 +00:00
msgid "Adding More Numeric ABCs"
msgstr "Ajouter plus d'ABC numériques"
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:111
2016-10-30 09:46:26 +00:00
msgid ""
"There are, of course, more possible ABCs for numbers, and this would be a "
"poor hierarchy if it precluded the possibility of adding those. You can add "
"``MyFoo`` between :class:`Complex` and :class:`Real` with::"
msgstr ""
"Il est bien entendu possible de créer davantage dABC pour les nombres et "
"cette hiérarchie serait médiocre si elle excluait la possibilité d'en "
"ajouter. Vous pouvez ajouter ``MyFoo`` entre :class:`Complex` et :class:"
"`Real` ainsi ::"
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:123
2016-10-30 09:46:26 +00:00
msgid "Implementing the arithmetic operations"
msgstr "Implémentation des opérations arithmétiques"
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:125
2016-10-30 09:46:26 +00:00
msgid ""
"We want to implement the arithmetic operations so that mixed-mode operations "
"either call an implementation whose author knew about the types of both "
"arguments, or convert both to the nearest built in type and do the operation "
"there. For subtypes of :class:`Integral`, this means that :meth:`__add__` "
"and :meth:`__radd__` should be defined as::"
msgstr ""
"Nous voulons implémenter les opérations arithmétiques de sorte que les "
"opérations en mode mixte appellent une implémentation dont l'auteur connaît "
"les types des deux arguments, ou convertissent chacun dans le type natif le "
"plus proche et effectuent l'opération sur ces types. Pour les sous-types de :"
"class:`Integral`, cela signifie que :meth:`__add__` et :meth:`__radd__` "
2019-05-30 21:42:39 +00:00
"devraient être définis comme suit ::"
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:156
2016-10-30 09:46:26 +00:00
msgid ""
"There are 5 different cases for a mixed-type operation on subclasses of :"
"class:`Complex`. I'll refer to all of the above code that doesn't refer to "
"``MyIntegral`` and ``OtherTypeIKnowAbout`` as \"boilerplate\". ``a`` will be "
"an instance of ``A``, which is a subtype of :class:`Complex` (``a : A <: "
"Complex``), and ``b : B <: Complex``. I'll consider ``a + b``:"
msgstr ""
"Il existe 5 cas différents pour une opération de type mixte sur des sous-"
"classes de :class:`Complex`. Nous nous référerons à tout le code ci-dessus "
"qui ne se réfère pas à ``MyIntegral`` et ``OtherTypeIKnowAbout`` comme "
"\"expression générique\". ``a`` est une instance de ``A``, qui est un sous-"
"type de :class:`Complex` (``a : A <: Complex``) et ``b : B <: Complex``. "
"Considérons ``a + b`` :"
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:163
2016-10-30 09:46:26 +00:00
msgid "If ``A`` defines an :meth:`__add__` which accepts ``b``, all is well."
msgstr "Si ``A`` définit une :meth:`__add__` qui accepte ``b``, tout va bien."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:165
2016-10-30 09:46:26 +00:00
msgid ""
"If ``A`` falls back to the boilerplate code, and it were to return a value "
"from :meth:`__add__`, we'd miss the possibility that ``B`` defines a more "
"intelligent :meth:`__radd__`, so the boilerplate should return :const:"
"`NotImplemented` from :meth:`__add__`. (Or ``A`` may not implement :meth:"
"`__add__` at all.)"
msgstr ""
"Si ``A`` fait appel au code générique et que celui-ci renvoie une valeur de :"
"meth:`__add__`, nous manquons la possibilité que ``B`` définisse une :meth:"
"`__radd__` plus intelligent, donc le code générique devrait retourner :const:"
"`NotImplemented` dans :meth:`__add__` (ou alors ``A`` ne doit pas "
"implémenter :meth:`__add__` du tout.)"
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:171
2016-10-30 09:46:26 +00:00
msgid ""
"Then ``B``'s :meth:`__radd__` gets a chance. If it accepts ``a``, all is "
"well."
msgstr ""
"Alors :meth:`__radd__` de ``B`` a une chance. si elle accepte ``a``, tout va "
"bien."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:173
2016-10-30 09:46:26 +00:00
msgid ""
"If it falls back to the boilerplate, there are no more possible methods to "
"try, so this is where the default implementation should live."
msgstr ""
"Si elle fait appel au code générique, il n'y a plus de méthode possible à "
"essayer, c'est donc ici que l'implémentation par défaut intervient."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:176
2016-10-30 09:46:26 +00:00
msgid ""
"If ``B <: A``, Python tries ``B.__radd__`` before ``A.__add__``. This is ok, "
"because it was implemented with knowledge of ``A``, so it can handle those "
"instances before delegating to :class:`Complex`."
msgstr ""
"Si ``B < : A``, Python essaie ``B.__radd__`` avant ``A.__add__``. C'est "
"valable parce qu'elle est implémentée avec la connaissance de ``A``, donc "
"elle peut gérer ces instances avant de déléguer à :class:`Complex`."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:181
2016-10-30 09:46:26 +00:00
msgid ""
"If ``A <: Complex`` and ``B <: Real`` without sharing any other knowledge, "
"then the appropriate shared operation is the one involving the built in :"
"class:`complex`, and both :meth:`__radd__` s land there, so ``a+b == b+a``."
msgstr ""
2019-05-30 21:42:39 +00:00
"Si ``A <: Complex`` et ``B <: Real`` sans autre information, alors "
"l'opération commune appropriée est celle impliquant :class:`complex` et les "
"deux :meth:`__radd__` atterrissent à cet endroit, donc ``a+b == b+a``."
2016-10-30 09:46:26 +00:00
#: library/numbers.rst:186
2016-10-30 09:46:26 +00:00
msgid ""
"Because most of the operations on any given type will be very similar, it "
"can be useful to define a helper function which generates the forward and "
"reverse instances of any given operator. For example, :class:`fractions."
"Fraction` uses::"
msgstr ""
"Comme la plupart des opérations sur un type donné seront très similaires, il "
"peut être utile de définir une fonction accessoire qui génère les instances "
"résultantes et inverses d'un opérateur donné. Par exemple, :class:`fractions."
"Fraction` utilise ::"