forked from AFPy/python-docs-fr
Traduction de library/bisect.po (#1721)
Automerge of PR #1721 by @Jean-Abou-Samra #1720 Closes #1720. Co-authored-by: Christophe Nanteuil <35002064+christopheNan@users.noreply.github.com>
This commit is contained in:
parent cb43975d96
commit e024e948d3
1 changed files with 46 additions and 21 deletions
| | @ -6,13 +6,14 @@ msgstr "" | |||
"Project-Id-Version: Python 3\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2021-09-23 16:16+0200\n" | ||||
"PO-Revision-Date: 2018-07-29 01:03+0200\n" | ||||
"Last-Translator: Julien Palard <julien@palard.fr>\n" | ||||
"PO-Revision-Date: 2021-10-17 12:13+0200\n" | ||||
"Last-Translator: Jean Abou Samra <jean@abou-samra.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" | ||||
"X-Generator: Poedit 3.0\n" | ||||
| ||||
#: library/bisect.rst:2 | ||||
msgid ":mod:`bisect` --- Array bisection algorithm" | ||||
| | @ -42,7 +43,7 @@ msgstr "" | |||
| ||||
#: library/bisect.rst:21 | ||||
msgid "The following functions are provided:" | ||||
msgstr "Les fonctions suivantes sont fournies :" | ||||
msgstr "Les fonctions suivantes sont fournies :" | ||||
| ||||
#: library/bisect.rst:26 | ||||
msgid "" | ||||
| | @ -61,15 +62,14 @@ msgstr "" | |||
"directement être utilisée comme premier paramètre de ``list.insert()``." | ||||
| ||||
#: library/bisect.rst:33 | ||||
#, fuzzy | ||||
msgid "" | ||||
"The returned insertion point *i* partitions the array *a* into two halves so " | ||||
"that ``all(val < x for val in a[lo : i])`` for the left side and ``all(val " | ||||
">= x for val in a[i : hi])`` for the right side." | ||||
msgstr "" | ||||
"Le point d'insertion renvoyé, *i*, coupe la liste *a* en deux moitiés telles " | ||||
"que, pour la moitié de gauche : ``all(val < x for val in a[lo:i])``, et pour " | ||||
"la partie de droite : ``all(val >= x for val in a[i:hi])``." | ||||
"que, pour la moitié de gauche : ``all(val < x for val in a[lo : i])``, et " | ||||
"pour la partie de droite : ``all(val >= x for val in a[i : hi])``." | ||||
| ||||
#: library/bisect.rst:55 library/bisect.rst:88 | ||||
msgid "" | ||||
| | @ -77,10 +77,14 @@ msgid "" | |||
"extract a comparison key from each input element. The default value is " | ||||
"``None`` (compare the elements directly)." | ||||
msgstr "" | ||||
"Le paramètre facultatif *key* est une :term:`fonction clé <key function>` " | ||||
"prenant un argument. S'il est fourni, les comparaisons se font sur les " | ||||
"valeurs renvoyées par la fonction clé. Par défaut, les éléments sont " | ||||
"comparés directement." | ||||
| ||||
#: library/bisect.rst:59 library/bisect.rst:99 | ||||
msgid "Added the *key* parameter." | ||||
msgstr "" | ||||
msgstr "ajout du paramètre *key*." | ||||
| ||||
#: library/bisect.rst:48 | ||||
msgid "" | ||||
| | @ -91,19 +95,18 @@ msgstr "" | |||
"droite) d'une potentielle entrée existante valant *x* dans *a*." | ||||
| ||||
#: library/bisect.rst:51 | ||||
#, fuzzy | ||||
msgid "" | ||||
"The returned insertion point *i* partitions the array *a* into two halves so " | ||||
"that ``all(val <= x for val in a[lo : i])`` for the left side and ``all(val " | ||||
"> x for val in a[i : hi])`` for the right side." | ||||
msgstr "" | ||||
"Le point d'insertion renvoyé, *i*, coupe la liste *a* en deux moitiés telles " | ||||
"que, pour la moitié de gauche : ``all(val <= x for val in a[lo:i])`` et pour " | ||||
"la moitié de droite : ``all(val > x for val in a[i:hi])``." | ||||
"que, pour la moitié de gauche : ``all(val <= x for val in a[lo : i])`` et " | ||||
"pour la moitié de droite : ``all(val > x for val in a[i : hi])``." | ||||
| ||||
#: library/bisect.rst:65 | ||||
msgid "Insert *x* in *a* in sorted order." | ||||
msgstr "" | ||||
msgstr "Insère *x* dans *a* en préservant l'ordre." | ||||
| ||||
#: library/bisect.rst:71 | ||||
msgid "" | ||||
| | @ -111,12 +114,18 @@ msgid "" | |||
"Next, it runs the :meth:`insert` method on *a* to insert *x* at the " | ||||
"appropriate position to maintain sort order." | ||||
msgstr "" | ||||
"Cette fonction commence par appliquer :func:`bisect_left` pour déterminer la " | ||||
"position de l'insertion, puis appelle la méthode :meth:`insert` de *a* pour " | ||||
"ajouter *x* à l'endroit adéquat." | ||||
| ||||
#: library/bisect.rst:96 | ||||
msgid "" | ||||
"Keep in mind that the ``O(log n)`` search is dominated by the slow O(n) " | ||||
"insertion step." | ||||
msgstr "" | ||||
"Gardez à l'esprit que la complexité logarithmique :math:`O(\\ln(n))` de la " | ||||
"recherche est dominée par la lenteur de l'insertion, de complexité linéaire :" | ||||
"math:`O(n)`." | ||||
| ||||
#: library/bisect.rst:85 | ||||
msgid "" | ||||
| | @ -132,28 +141,36 @@ msgid "" | |||
"Next, it runs the :meth:`insert` method on *a* to insert *x* at the " | ||||
"appropriate position to maintain sort order." | ||||
msgstr "" | ||||
"Le principe est le même que :func:`insort_left`, mais avec :func:" | ||||
"`bisect_right`." | ||||
| ||||
#: library/bisect.rst:104 | ||||
msgid "Performance Notes" | ||||
msgstr "" | ||||
msgstr "Notes sur la performance" | ||||
| ||||
#: library/bisect.rst:106 | ||||
msgid "" | ||||
"When writing time sensitive code using *bisect()* and *insort()*, keep these " | ||||
"thoughts in mind:" | ||||
msgstr "" | ||||
"Pour écrire du code sensible à la performance utilisant ``bisect()`` et " | ||||
"``insort()``, prenez en compte ces quelques considérations :" | ||||
| ||||
#: library/bisect.rst:109 | ||||
msgid "" | ||||
"Bisection is effective for searching ranges of values. For locating specific " | ||||
"values, dictionaries are more performant." | ||||
msgstr "" | ||||
"La bissection est une bonne idée pour rechercher une plage de valeurs. Pour " | ||||
"une seule valeur, mieux vaut un dictionnaire." | ||||
| ||||
#: library/bisect.rst:112 | ||||
msgid "" | ||||
"The *insort()* functions are ``O(n)`` because the logarithmic search step is " | ||||
"dominated by the linear time insertion step." | ||||
msgstr "" | ||||
"Les fonctions d'insertion dans une liste classée ont une complexité linéaire " | ||||
"car c'est le coût d'une insertion, même si la recherche est logarithmique." | ||||
| ||||
#: library/bisect.rst:115 | ||||
msgid "" | ||||
| | @ -165,6 +182,14 @@ msgid "" | |||
"an array of precomputed keys to locate the insertion point (as shown in the " | ||||
"examples section below)." | ||||
msgstr "" | ||||
"Les fonctions de recherche ne maintiennent pas d'état et ne conservent pas " | ||||
"le résultat de la fonction clé après utilisation. Par conséquent, si elles " | ||||
"sont appelées dans une boucle, la fonction clé peut être appelée de " | ||||
"nombreuses fois sur les mêmes entrées. Si cette fonction clé est lente, une " | ||||
"possibilité est de l'encapsuler dans :func:`functools.cache` pour éviter de " | ||||
"répéter les opérations. Une autre possibilité est d'effectuer la recherche " | ||||
"sur un tableau de clés pré-calculées pour trouver le point d'insertion (voir " | ||||
"les exemples plus bas)." | ||||
| ||||
#: library/bisect.rst:125 | ||||
msgid "" | ||||
| | @ -172,9 +197,11 @@ msgid "" | |||
"a high performance module that uses *bisect* to managed sorted collections " | ||||
"of data." | ||||
msgstr "" | ||||
"`Sorted Collections <http://www.grantjenks.com/docs/sortedcollections/>`_ " | ||||
"est un module de haute performance qui fait appel à *bisect* pour maintenir " | ||||
"des données ordonnées." | ||||
| ||||
#: library/bisect.rst:129 | ||||
#, fuzzy | ||||
msgid "" | ||||
"The `SortedCollection recipe <https://code.activestate.com/recipes/577197-" | ||||
"sortedcollection/>`_ uses bisect to build a full-featured collection class " | ||||
| | @ -205,9 +232,8 @@ msgstr "" | |||
"transformer en recherche plus classique pour les listes triées ::" | ||||
| ||||
#: library/bisect.rst:181 | ||||
#, fuzzy | ||||
msgid "Examples" | ||||
msgstr "Autres Exemples" | ||||
msgstr "Exemples" | ||||
| ||||
#: library/bisect.rst:185 | ||||
msgid "" | ||||
| | @ -218,18 +244,17 @@ msgid "" | |||
msgstr "" | ||||
"La fonction :func:`bisect` peut être utile pour des recherches dans des " | ||||
"tableaux de nombres. Cet exemple utilise :func:`bisect` pour rechercher la " | ||||
"note (sous forme de lettre) correspondant à un note sous forme de points, en " | ||||
"se basant sur une échelle prédéfinie : plus de 90 vaut 'A', de 80 à 89 vaut " | ||||
"'B', etc… ::" | ||||
"note (sous forme de lettre) correspondant à une note sous forme de points, " | ||||
"en se basant sur une échelle prédéfinie : plus de 90 vaut 'A', de 80 à 89 " | ||||
"vaut 'B', etc. ::" | ||||
| ||||
#: library/bisect.rst:197 | ||||
#, fuzzy | ||||
msgid "" | ||||
"One technique to avoid repeated calls to a key function is to search a list " | ||||
"of precomputed keys to find the index of a record::" | ||||
msgstr "" | ||||
"Il est préférable d'utiliser une liste de clefs pré-calculée pour chercher " | ||||
"l'index de l'enregistrement en question ::" | ||||
"Une technique consiste à utiliser une liste de clefs pré-calculée pour " | ||||
"chercher l'indice de l'enregistrement en question ::" | ||||
| ||||
#~ msgid "" | ||||
#~ "Insert *x* in *a* in sorted order. This is equivalent to ``a." | ||||
| | | |||
Loading…
Add table
Add a link
Reference in a new issue