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

279 lines
12 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Copyright (C) 2001-2018, Python Software Foundation
# For licence information, see README file.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"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"
"Last-Translator: Julien Palard <julien@palard.fr>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: library/numbers.rst:2
msgid ":mod:`numbers` --- Numeric abstract base classes"
msgstr ":mod:`numbers` — Classes de base abstraites numériques"
#: library/numbers.rst:7
msgid "**Source code:** :source:`Lib/numbers.py`"
msgstr "**Code source :** :source:`Lib/numbers.py`"
#: library/numbers.rst:11
#, fuzzy
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."
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é."
#: library/numbers.rst:18
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)``."
#: library/numbers.rst:23
msgid "The numeric tower"
msgstr "La tour numérique"
#: library/numbers.rst:27
#, fuzzy
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."
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."
#: library/numbers.rst:35
msgid "Abstract. Retrieves the real component of this number."
msgstr "Abstrait. Récupère la partie réelle de ce nombre."
#: library/numbers.rst:39
msgid "Abstract. Retrieves the imaginary component of this number."
msgstr "Abstrait. Retrouve la partie imaginaire de ce nombre."
#: library/numbers.rst:43
msgid ""
"Abstract. Returns the complex conjugate. For example, ``(1+3j).conjugate() "
"== (1-3j)``."
msgstr ""
"Abstrait. Renvoie le complexe conjugué. Par exemple, ``(1+3j).conjugate() == "
"(1-3j)``."
#: library/numbers.rst:48
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`."
#: library/numbers.rst:51
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 ""
"En bref, celles-ci sont : une conversion vers :class:`float`, :func:`math."
"trunc`, :func:`round`, :func:`math.floor`, :func:`math.ceil`, :func:"
"`divmod`, ``//``, ``%``, ``<``, ``<=``, ``>`` et ``>=``."
#: library/numbers.rst:55
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:"
"`~Complex.real`, :attr:`~Complex.imag` et :meth:`~Complex.conjugate`."
#: library/numbers.rst:61
#, fuzzy
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."
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:75
msgid "Abstract."
msgstr "Abstrait."
#: library/numbers.rst:80
#, fuzzy
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: ``<<``, ``>>``, ``&``, ``^``, ``|``, ``~``."
msgstr ""
"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: ``<<``, ``>>``, ``&``, ``^``, ``|``, "
"``~``."
#: library/numbers.rst:88
msgid "Notes for type implementors"
msgstr "Notes pour implémenter des types"
#: library/numbers.rst:90
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 ::"
#: library/numbers.rst:109
msgid "Adding More Numeric ABCs"
msgstr "Ajouter plus d'ABC numériques"
#: library/numbers.rst:111
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 ::"
#: library/numbers.rst:123
msgid "Implementing the arithmetic operations"
msgstr "Implémentation des opérations arithmétiques"
#: library/numbers.rst:125
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__` "
"devraient être définis comme suit ::"
#: library/numbers.rst:156
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`` :"
#: library/numbers.rst:163
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."
#: library/numbers.rst:165
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.)"
#: library/numbers.rst:171
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."
#: library/numbers.rst:173
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."
#: library/numbers.rst:176
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`."
#: library/numbers.rst:181
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 ""
"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``."
#: library/numbers.rst:186
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 ::"