# SOME DESCRIPTIVE TITLE. # Copyright (C) 1990-2016, 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 2.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-10-30 10:44+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../Doc/library/itertools.rst:3 msgid ":mod:`itertools` --- Functions creating iterators for efficient looping" msgstr "" ":mod:`itertools` --- Fonctions créant des itérateurs pour boucler " "efficacement." #: ../Doc/library/itertools.rst:17 msgid "" "This module implements a number of :term:`iterator` building blocks inspired " "by constructs from APL, Haskell, and SML. Each has been recast in a form " "suitable for Python." msgstr "" "Ce module implémente de nombreuses briques :term:`d'itérateurs ` " "inspirées par des constructions de APL, Haskell et SML. Toutes ont été " "retravaillées dans un format adéquat pour Python." #: ../Doc/library/itertools.rst:21 msgid "" "The module standardizes a core set of fast, memory efficient tools that are " "useful by themselves or in combination. Together, they form an \"iterator " "algebra\" making it possible to construct specialized tools succinctly and " "efficiently in pure Python." msgstr "" "Ce module standardise un noyau d'outils rapide, efficaces en mémoire qui " "sont utiles d'eux-mêmes ou en les combinant. Ensemble, ils forment une " "\"algèbre d'itérateurs\" rendant possible la construction succincte et " "efficace d'outils spécialisés en Python seulement." #: ../Doc/library/itertools.rst:26 msgid "" "For instance, SML provides a tabulation tool: ``tabulate(f)`` which produces " "a sequence ``f(0), f(1), ...``. The same effect can be achieved in Python " "by combining :func:`imap` and :func:`count` to form ``imap(f, count())``." msgstr "" #: ../Doc/library/itertools.rst:30 msgid "" "These tools and their built-in counterparts also work well with the high-" "speed functions in the :mod:`operator` module. For example, the " "multiplication operator can be mapped across two vectors to form an " "efficient dot-product: ``sum(imap(operator.mul, vector1, vector2))``." msgstr "" #: ../Doc/library/itertools.rst:36 msgid "**Infinite Iterators:**" msgstr "**Itérateurs infinis :**" #: ../Doc/library/itertools.rst:39 ../Doc/library/itertools.rst:49 #: ../Doc/library/itertools.rst:69 msgid "Iterator" msgstr "Itérateur" #: ../Doc/library/itertools.rst:39 ../Doc/library/itertools.rst:49 #: ../Doc/library/itertools.rst:69 msgid "Arguments" msgstr "Arguments" #: ../Doc/library/itertools.rst:39 ../Doc/library/itertools.rst:49 #: ../Doc/library/itertools.rst:69 msgid "Results" msgstr "Résultats" #: ../Doc/library/itertools.rst:39 ../Doc/library/itertools.rst:49 msgid "Example" msgstr "Exemple" #: ../Doc/library/itertools.rst:41 msgid ":func:`count`" msgstr ":func:`count`" #: ../Doc/library/itertools.rst:41 msgid "start, [step]" msgstr "start, [step]" #: ../Doc/library/itertools.rst:41 msgid "start, start+step, start+2*step, ..." msgstr "start, start+step, start+2*step, ..." #: ../Doc/library/itertools.rst:41 msgid "``count(10) --> 10 11 12 13 14 ...``" msgstr "``count(10) --> 10 11 12 13 14 ...``" #: ../Doc/library/itertools.rst:42 msgid ":func:`cycle`" msgstr ":func:`cycle`" #: ../Doc/library/itertools.rst:42 msgid "p" msgstr "p" #: ../Doc/library/itertools.rst:42 msgid "p0, p1, ... plast, p0, p1, ..." msgstr "p0, p1, ... plast, p0, p1, ..." #: ../Doc/library/itertools.rst:42 msgid "``cycle('ABCD') --> A B C D A B C D ...``" msgstr "``cycle('ABCD') --> A B C D A B C D ...``" #: ../Doc/library/itertools.rst:43 msgid ":func:`repeat`" msgstr ":func:`repeat`" #: ../Doc/library/itertools.rst:43 msgid "elem [,n]" msgstr "elem [,n]" #: ../Doc/library/itertools.rst:43 msgid "elem, elem, elem, ... endlessly or up to n times" msgstr "*elem*, *elem*, *elem*, ... à l'infini ou jusqu'à n fois" #: ../Doc/library/itertools.rst:43 msgid "``repeat(10, 3) --> 10 10 10``" msgstr "``repeat(10, 3) --> 10 10 10``" #: ../Doc/library/itertools.rst:46 msgid "**Iterators terminating on the shortest input sequence:**" msgstr "**Itérateurs se terminant par la séquence d'entrée la plus courte :**" #: ../Doc/library/itertools.rst:51 msgid ":func:`chain`" msgstr ":func:`chain`" #: ../Doc/library/itertools.rst:51 ../Doc/library/itertools.rst:62 #: ../Doc/library/itertools.rst:63 msgid "p, q, ..." msgstr "p, q, ..." #: ../Doc/library/itertools.rst:51 msgid "p0, p1, ... plast, q0, q1, ..." msgstr "p0, p1, ... plast, q0, q1, ..." #: ../Doc/library/itertools.rst:51 msgid "``chain('ABC', 'DEF') --> A B C D E F``" msgstr "``chain('ABC', 'DEF') --> A B C D E F``" #: ../Doc/library/itertools.rst:52 msgid ":func:`compress`" msgstr ":func:`compress`" #: ../Doc/library/itertools.rst:52 msgid "data, selectors" msgstr "data, selectors" #: ../Doc/library/itertools.rst:52 msgid "(d[0] if s[0]), (d[1] if s[1]), ..." msgstr "(d[0] if s[0]), (d[1] if s[1]), ..." #: ../Doc/library/itertools.rst:52 msgid "``compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F``" msgstr "``compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F``" #: ../Doc/library/itertools.rst:53 msgid ":func:`dropwhile`" msgstr ":func:`dropwhile`" #: ../Doc/library/itertools.rst:53 ../Doc/library/itertools.rst:55 #: ../Doc/library/itertools.rst:56 ../Doc/library/itertools.rst:61 msgid "pred, seq" msgstr "pred, seq" #: ../Doc/library/itertools.rst:53 msgid "seq[n], seq[n+1], starting when pred fails" msgstr "``seq[n]``, ``seq[n+1]``, commençant quand *pred* échoue" #: ../Doc/library/itertools.rst:53 msgid "``dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1``" msgstr "``dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1``" #: ../Doc/library/itertools.rst:54 msgid ":func:`groupby`" msgstr ":func:`groupby`" #: ../Doc/library/itertools.rst:54 msgid "iterable[, keyfunc]" msgstr "iterable[, keyfunc]" #: ../Doc/library/itertools.rst:54 msgid "sub-iterators grouped by value of keyfunc(v)" msgstr "sous-itérateurs groupés par la valeur de *keyfunc(v)*" #: ../Doc/library/itertools.rst:55 msgid ":func:`ifilter`" msgstr "" #: ../Doc/library/itertools.rst:55 msgid "elements of seq where pred(elem) is true" msgstr "" #: ../Doc/library/itertools.rst:55 msgid "``ifilter(lambda x: x%2, range(10)) --> 1 3 5 7 9``" msgstr "" #: ../Doc/library/itertools.rst:56 msgid ":func:`ifilterfalse`" msgstr "" #: ../Doc/library/itertools.rst:56 msgid "elements of seq where pred(elem) is false" msgstr "éléments de *seq* quand *pred(elem)* est faux" #: ../Doc/library/itertools.rst:56 msgid "``ifilterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8``" msgstr "" #: ../Doc/library/itertools.rst:57 msgid ":func:`islice`" msgstr ":func:`islice`" #: ../Doc/library/itertools.rst:57 msgid "seq, [start,] stop [, step]" msgstr "seq, [start,] stop [, step]" #: ../Doc/library/itertools.rst:57 msgid "elements from seq[start:stop:step]" msgstr "éléments de ``seq[start:stop:step]``" #: ../Doc/library/itertools.rst:57 msgid "``islice('ABCDEFG', 2, None) --> C D E F G``" msgstr "``islice('ABCDEFG', 2, None) --> C D E F G``" #: ../Doc/library/itertools.rst:58 msgid ":func:`imap`" msgstr "" #: ../Doc/library/itertools.rst:58 msgid "func, p, q, ..." msgstr "" #: ../Doc/library/itertools.rst:58 msgid "func(p0, q0), func(p1, q1), ..." msgstr "" #: ../Doc/library/itertools.rst:58 msgid "``imap(pow, (2,3,10), (5,2,3)) --> 32 9 1000``" msgstr "" #: ../Doc/library/itertools.rst:59 msgid ":func:`starmap`" msgstr ":func:`starmap`" #: ../Doc/library/itertools.rst:59 msgid "func, seq" msgstr "func, seq" #: ../Doc/library/itertools.rst:59 msgid "func(\\*seq[0]), func(\\*seq[1]), ..." msgstr "func(\\*seq[0]), func(\\*seq[1]), ..." #: ../Doc/library/itertools.rst:59 msgid "``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000``" msgstr "``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000``" #: ../Doc/library/itertools.rst:60 msgid ":func:`tee`" msgstr ":func:`tee`" #: ../Doc/library/itertools.rst:60 msgid "it, n" msgstr "it, n" #: ../Doc/library/itertools.rst:60 msgid "it1, it2, ... itn splits one iterator into n" msgstr "*it1*, *it2*, ... *itn* sépare un itérateur en *n*" #: ../Doc/library/itertools.rst:61 msgid ":func:`takewhile`" msgstr ":func:`takewhile`" #: ../Doc/library/itertools.rst:61 msgid "seq[0], seq[1], until pred fails" msgstr "``seq[0]``, ``seq[1]``, jusqu'à ce que *pred* échoue" #: ../Doc/library/itertools.rst:61 msgid "``takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4``" msgstr "``takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4``" #: ../Doc/library/itertools.rst:62 msgid ":func:`izip`" msgstr "" #: ../Doc/library/itertools.rst:62 ../Doc/library/itertools.rst:63 msgid "(p[0], q[0]), (p[1], q[1]), ..." msgstr "(p[0], q[0]), (p[1], q[1]), ..." #: ../Doc/library/itertools.rst:62 msgid "``izip('ABCD', 'xy') --> Ax By``" msgstr "" #: ../Doc/library/itertools.rst:63 msgid ":func:`izip_longest`" msgstr "" #: ../Doc/library/itertools.rst:63 msgid "``izip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-``" msgstr "" #: ../Doc/library/itertools.rst:66 msgid "**Combinatoric generators:**" msgstr "**Générateurs combinatoires :**" #: ../Doc/library/itertools.rst:71 msgid ":func:`product`" msgstr ":func:`product`" #: ../Doc/library/itertools.rst:71 msgid "p, q, ... [repeat=1]" msgstr "p, q, ... [repeat=1]" #: ../Doc/library/itertools.rst:71 msgid "cartesian product, equivalent to a nested for-loop" msgstr "produit cartésien, équivalent à une boucle *for* imbriquée" #: ../Doc/library/itertools.rst:72 msgid ":func:`permutations`" msgstr ":func:`permutations`" #: ../Doc/library/itertools.rst:72 msgid "p[, r]" msgstr "p[, r]" #: ../Doc/library/itertools.rst:72 msgid "r-length tuples, all possible orderings, no repeated elements" msgstr "" "*tuples* de longueur *r*, tous les ré-arrangements possibles, sans " "répétition d'éléments" #: ../Doc/library/itertools.rst:73 msgid ":func:`combinations`" msgstr ":func:`combinations`" #: ../Doc/library/itertools.rst:73 ../Doc/library/itertools.rst:74 msgid "p, r" msgstr "p, r" #: ../Doc/library/itertools.rst:73 msgid "r-length tuples, in sorted order, no repeated elements" msgstr "tuples de longueur r, triés, sans répétition d'éléments" #: ../Doc/library/itertools.rst:74 msgid ":func:`combinations_with_replacement`" msgstr ":func:`combinations_with_replacement`" #: ../Doc/library/itertools.rst:74 msgid "r-length tuples, in sorted order, with repeated elements" msgstr "tuples de longueur r, triés, avec répétition d'éléments" #: ../Doc/library/itertools.rst:75 msgid "``product('ABCD', repeat=2)``" msgstr "``product('ABCD', repeat=2)``" #: ../Doc/library/itertools.rst:75 msgid "``AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD``" msgstr "``AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD``" #: ../Doc/library/itertools.rst:76 msgid "``permutations('ABCD', 2)``" msgstr "``permutations('ABCD', 2)``" #: ../Doc/library/itertools.rst:76 msgid "``AB AC AD BA BC BD CA CB CD DA DB DC``" msgstr "``AB AC AD BA BC BD CA CB CD DA DB DC``" #: ../Doc/library/itertools.rst:77 msgid "``combinations('ABCD', 2)``" msgstr "``combinations('ABCD', 2)``" #: ../Doc/library/itertools.rst:77 msgid "``AB AC AD BC BD CD``" msgstr "``AB AC AD BC BD CD``" #: ../Doc/library/itertools.rst:78 msgid "``combinations_with_replacement('ABCD', 2)``" msgstr "``combinations_with_replacement('ABCD', 2)``" #: ../Doc/library/itertools.rst:78 msgid "``AA AB AC AD BB BC BD CC CD DD``" msgstr "``AA AB AC AD BB BC BD CC CD DD``" #: ../Doc/library/itertools.rst:85 msgid "Itertool functions" msgstr "Fonctions d'*itertool*" #: ../Doc/library/itertools.rst:87 msgid "" "The following module functions all construct and return iterators. Some " "provide streams of infinite length, so they should only be accessed by " "functions or loops that truncate the stream." msgstr "" "Toutes les fonctions de module qui suivent construisent et renvoient des " "itérateurs. Certaines fournissent des flux de longueur infinie, elles " "devraient seulement être accédées par des fonctions ou boucles qui tronquent " "le flux." #: ../Doc/library/itertools.rst:94 msgid "" "Make an iterator that returns elements from the first iterable until it is " "exhausted, then proceeds to the next iterable, until all of the iterables " "are exhausted. Used for treating consecutive sequences as a single " "sequence. Roughly equivalent to::" msgstr "" "Créer un itérateur qui renvoie les éléments du premier itérable jusqu'à son " "épuisement, puis continue avec l'itérable suivant jusqu'à ce que tous les " "itérables soient épuisés. Utilisée pour traiter des séquences consécutives " "comme une seule séquence Sensiblement équivalente à : ::" #: ../Doc/library/itertools.rst:108 msgid "" "Alternate constructor for :func:`chain`. Gets chained inputs from a single " "iterable argument that is evaluated lazily. Roughly equivalent to::" msgstr "" "Constructeur alternatif pour :func:`chain`. Récupère des entrées chaînées " "d'un unique argument itérable qui est évalué de manière paresseuse. " "Sensiblement équivalente à : ::" #: ../Doc/library/itertools.rst:122 msgid "Return *r* length subsequences of elements from the input *iterable*." msgstr "Renvoyer les sous-séquences de longueur *r* de l'itérable *iterable*." #: ../Doc/library/itertools.rst:124 ../Doc/library/itertools.rst:175 msgid "" "Combinations are emitted in lexicographic sort order. So, if the input " "*iterable* is sorted, the combination tuples will be produced in sorted " "order." msgstr "" "Les combinaisons sont émises dans l'ordre lexicographique. Ainsi, si " "l'itérable *iterable* est trié, les *tuples* de combinaison seront produits " "dans l'ordre." #: ../Doc/library/itertools.rst:128 msgid "" "Elements are treated as unique based on their position, not on their value. " "So if the input elements are unique, there will be no repeat values in each " "combination." msgstr "" "Les éléments sont considérés comme uniques en fonction de leur position, et " "non pas de leur valeur. Ainsi, si les éléments en entrée sont uniques, il " "n'y aura pas de valeurs répétées dans chaque combinaison." #: ../Doc/library/itertools.rst:132 ../Doc/library/itertools.rst:183 #: ../Doc/library/itertools.rst:502 msgid "Roughly equivalent to::" msgstr "Sensiblement équivalent à : ::" #: ../Doc/library/itertools.rst:154 msgid "" "The code for :func:`combinations` can be also expressed as a subsequence of :" "func:`permutations` after filtering entries where the elements are not in " "sorted order (according to their position in the input pool)::" msgstr "" "Le code de :func:`combinations` peut aussi être exprimé comme une sous-" "séquence de :func:`permutations` après avoir filtré les entrées dont les " "éléments ne sont pas triés (selon leur position dans le *pool* d'entrée) : ::" #: ../Doc/library/itertools.rst:165 msgid "" "The number of items returned is ``n! / r! / (n-r)!`` when ``0 <= r <= n`` or " "zero when ``r > n``." msgstr "" "Le nombre d'éléments renvoyés est ``n! / r! / (n-r)!`` quand ``0 <= r <= n`` " "ou zéro quand ``r > n``." #: ../Doc/library/itertools.rst:172 msgid "" "Return *r* length subsequences of elements from the input *iterable* " "allowing individual elements to be repeated more than once." msgstr "" "Renvoyer les sous-séquences de longueur *r* des éléments de l'itérable " "*iterable* d'entrée, permettant aux éléments individuels d'être répétés plus " "d'une fois." #: ../Doc/library/itertools.rst:179 msgid "" "Elements are treated as unique based on their position, not on their value. " "So if the input elements are unique, the generated combinations will also be " "unique." msgstr "" "Les éléments sont considérés comme uniques en fonction de leur position, et " "non pas de leur valeur. Ainsi si les éléments d'entrée sont uniques, les " "combinaisons générées seront aussi uniques." #: ../Doc/library/itertools.rst:202 msgid "" "The code for :func:`combinations_with_replacement` can be also expressed as " "a subsequence of :func:`product` after filtering entries where the elements " "are not in sorted order (according to their position in the input pool)::" msgstr "" "Le code pour :func:`combinations_with_replacement` peut aussi être exprimé " "comme une sous-séquence de :func:`product` après avoir filtré les entrées où " "les éléments ne sont pas dans triés (selon leur position dans le *pool* " "d'entrée) : ::" #: ../Doc/library/itertools.rst:213 msgid "" "The number of items returned is ``(n+r-1)! / r! / (n-1)!`` when ``n > 0``." msgstr "" "Le nombre d'éléments renvoyés est ``(n+r-1)! / r! / (n-1)!`` quand ``n > 0``." #: ../Doc/library/itertools.rst:219 msgid "" "Make an iterator that filters elements from *data* returning only those that " "have a corresponding element in *selectors* that evaluates to ``True``. " "Stops when either the *data* or *selectors* iterables has been exhausted. " "Roughly equivalent to::" msgstr "" "Créer un itérateur qui filtre les éléments de *data*, renvoyant seulement " "ceux qui ont un élément correspondant dans *selectors* qui évalue à " "``True``. S'arrête quand l'itérable *data* ou *selectors* a été épuisé. " "Sensiblement équivalent à : ::" #: ../Doc/library/itertools.rst:233 msgid "" "Make an iterator that returns evenly spaced values starting with *n*. Often " "used as an argument to :func:`imap` to generate consecutive data points. " "Also, used with :func:`izip` to add sequence numbers. Equivalent to::" msgstr "" #: ../Doc/library/itertools.rst:245 msgid "" "When counting with floating point numbers, better accuracy can sometimes be " "achieved by substituting multiplicative code such as: ``(start + step * i " "for i in count())``." msgstr "" "Quand on compte avec des nombres à virgule flottante, il est parfois " "possible d'obtenir une meilleure précision en substituant du code " "multiplicateur comme : ``(start + step * i for i in count())``." #: ../Doc/library/itertools.rst:249 msgid "added *step* argument and allowed non-integer arguments." msgstr "" #: ../Doc/library/itertools.rst:254 msgid "" "Make an iterator returning elements from the iterable and saving a copy of " "each. When the iterable is exhausted, return elements from the saved copy. " "Repeats indefinitely. Roughly equivalent to::" msgstr "" "Créer un itérateur qui renvoie les éléments de l'itérable et qui sauvegarde " "une copie de chaque. Quand l'itérable est épuisé, renvoyer les éléments " "depuis la copie sauvegardée. Répète à l'infini. Sensiblement équivalent " "à : ::" #: ../Doc/library/itertools.rst:268 msgid "" "Note, this member of the toolkit may require significant auxiliary storage " "(depending on the length of the iterable)." msgstr "" "Note, cette fonction pourrait avoir besoin d'un stockage auxiliaire " "important (en fonction de la longueur de l'itérable)." #: ../Doc/library/itertools.rst:274 msgid "" "Make an iterator that drops elements from the iterable as long as the " "predicate is true; afterwards, returns every element. Note, the iterator " "does not produce *any* output until the predicate first becomes false, so it " "may have a lengthy start-up time. Roughly equivalent to::" msgstr "" "Créer un itérateur qui saute les éléments de l'itérable tant que le prédicat " "est vrai ; ensuite, renvoyer chaque élément. Note, l'itérateur ne produit " "*aucune* sortie avant que le prédicat ne devienne faux, il peut donc avoir " "un temps de démarrage long. Sensiblement équivalent à : ::" #: ../Doc/library/itertools.rst:292 msgid "" "Make an iterator that returns consecutive keys and groups from the " "*iterable*. The *key* is a function computing a key value for each element. " "If not specified or is ``None``, *key* defaults to an identity function and " "returns the element unchanged. Generally, the iterable needs to already be " "sorted on the same key function." msgstr "" "Créer un itérateur qui renvoie les clés et les groupes de l'itérable " "*iterable*. La clé *key* est une fonction qui génère une clé pour chaque " "élément. Si *key* n'est pas spécifié ou est ``None``, elle vaut par défaut " "une fonction d'identité qui renvoie l'élément sans le modifier. " "Généralement, l'itérable a besoin d'être déjà trié selon cette même fonction " "de clé." #: ../Doc/library/itertools.rst:298 msgid "" "The operation of :func:`groupby` is similar to the ``uniq`` filter in Unix. " "It generates a break or new group every time the value of the key function " "changes (which is why it is usually necessary to have sorted the data using " "the same key function). That behavior differs from SQL's GROUP BY which " "aggregates common elements regardless of their input order." msgstr "" "L'opération de :func:`groupby` est similaire au filtre ``uniq`` dans Unix. " "Elle génère un nouveau groupe à chaque fois que la valeur de la fonction " "*key* change (ce pourquoi il est souvent nécessaire d'avoir trié les données " "selon la même fonction de clé). Ce comportement est différent de celui de " "GROUP BY de SQL qui agrège les éléments sans prendre compte de leur ordre " "d'entrée." #: ../Doc/library/itertools.rst:304 msgid "" "The returned group is itself an iterator that shares the underlying iterable " "with :func:`groupby`. Because the source is shared, when the :func:" "`groupby` object is advanced, the previous group is no longer visible. So, " "if that data is needed later, it should be stored as a list::" msgstr "" "Le groupe renvoyé est lui-même un itérateur qui partage l'itérable sous-" "jacent avec :func:`groupby`. Puisque que la source est partagée, quand " "l'objet :func:`groupby` est avancé, le groupe précédent n'est plus visible. " "Ainsi, si cette donnée doit être utilisée plus tard, elle devrait être " "stockée comme une liste : ::" #: ../Doc/library/itertools.rst:316 msgid ":func:`groupby` is roughly equivalent to::" msgstr ":func:`groupby` est sensiblement équivalent à : ::" #: ../Doc/library/itertools.rst:346 msgid "" "Make an iterator that filters elements from iterable returning only those " "for which the predicate is ``True``. If *predicate* is ``None``, return the " "items that are true. Roughly equivalent to::" msgstr "" #: ../Doc/library/itertools.rst:361 msgid "" "Make an iterator that filters elements from iterable returning only those " "for which the predicate is ``False``. If *predicate* is ``None``, return the " "items that are false. Roughly equivalent to::" msgstr "" "Créer un itérateur qui filtre les éléments de *iterable*, ne renvoyant " "seulement ceux pour lesquels le prédicat est ``Faux``. Si *predicate* vaut " "``None``, renvoyer les éléments qui sont faux. Sensiblement équivalent à : ::" #: ../Doc/library/itertools.rst:376 msgid "" "Make an iterator that computes the function using arguments from each of the " "iterables. If *function* is set to ``None``, then :func:`imap` returns the " "arguments as a tuple. Like :func:`map` but stops when the shortest iterable " "is exhausted instead of filling in ``None`` for shorter iterables. The " "reason for the difference is that infinite iterator arguments are typically " "an error for :func:`map` (because the output is fully evaluated) but " "represent a common and useful way of supplying arguments to :func:`imap`. " "Roughly equivalent to::" msgstr "" #: ../Doc/library/itertools.rst:398 msgid "" "Make an iterator that returns selected elements from the iterable. If " "*start* is non-zero, then elements from the iterable are skipped until start " "is reached. Afterward, elements are returned consecutively unless *step* is " "set higher than one which results in items being skipped. If *stop* is " "``None``, then iteration continues until the iterator is exhausted, if at " "all; otherwise, it stops at the specified position. Unlike regular " "slicing, :func:`islice` does not support negative values for *start*, " "*stop*, or *step*. Can be used to extract related fields from data where " "the internal structure has been flattened (for example, a multi-line report " "may list a name field on every third line). Roughly equivalent to::" msgstr "" "Créer un itérateur qui renvoie les élément sélectionnés de l'itérable. Si " "*start* est non-nul, alors les éléments de l'itérable sont sautés jusqu'à ce " "que *start* soit atteint. Ensuite, les éléments sont renvoyés " "consécutivement sauf si *step* est plus grand que 1, auquel cas certains " "éléments seront sautés. Si *stop* est ``None``, alors l'itération continue " "jusqu'à ce que l'itérateur soit épuisé s'il ne l'est pas déjà ; sinon, il " "s'arrête à la position spécifiée. À la différence du *slicing* standard, :" "func:`slice` ne supporte pas les valeurs négatives pour *start*, *stop* ou " "*step*. Peut être utilisée pour extraire les champs apparentés depuis des " "données dont la structure interne a été aplatie (par exemple, un rapport " "multi-ligne pourrait lister un nom de champ toutes les trois lignes). " "Sensiblement similaire à : ::" #: ../Doc/library/itertools.rst:421 msgid "" "If *start* is ``None``, then iteration starts at zero. If *step* is " "``None``, then the step defaults to one." msgstr "" "Si *start* vaut ``None``, alors l'itération commence à zéro. Si *step* vaut " "``None``, alors le pas est à 1 par défaut." #: ../Doc/library/itertools.rst:424 msgid "accept ``None`` values for default *start* and *step*." msgstr "" #: ../Doc/library/itertools.rst:430 msgid "" "Make an iterator that aggregates elements from each of the iterables. Like :" "func:`zip` except that it returns an iterator instead of a list. Used for " "lock-step iteration over several iterables at a time. Roughly equivalent " "to::" msgstr "" #: ../Doc/library/itertools.rst:440 msgid "" "When no iterables are specified, returns a zero length iterator instead of " "raising a :exc:`TypeError` exception." msgstr "" #: ../Doc/library/itertools.rst:444 msgid "" "The left-to-right evaluation order of the iterables is guaranteed. This " "makes possible an idiom for clustering a data series into n-length groups " "using ``izip(*[iter(s)]*n)``." msgstr "" #: ../Doc/library/itertools.rst:448 msgid "" ":func:`izip` should only be used with unequal length inputs when you don't " "care about trailing, unmatched values from the longer iterables. If those " "values are important, use :func:`izip_longest` instead." msgstr "" #: ../Doc/library/itertools.rst:455 msgid "" "Make an iterator that aggregates elements from each of the iterables. If the " "iterables are of uneven length, missing values are filled-in with " "*fillvalue*. Iteration continues until the longest iterable is exhausted. " "Roughly equivalent to::" msgstr "" "Créer un itérateur qui agrège les éléments de chacun des itérables. Si les " "itérables sont de longueurs différentes, les valeurs manquantes sont " "remplacées par *fillvalue*. L'itération continue jusqu'à ce que l'itérable " "le plus long soit épuisé. Sensiblement équivalent à : ::" #: ../Doc/library/itertools.rst:479 msgid "" "If one of the iterables is potentially infinite, then the :func:" "`izip_longest` function should be wrapped with something that limits the " "number of calls (for example :func:`islice` or :func:`takewhile`). If not " "specified, *fillvalue* defaults to ``None``." msgstr "" #: ../Doc/library/itertools.rst:488 msgid "" "Return successive *r* length permutations of elements in the *iterable*." msgstr "" "Renvoyer les permutations successives de longueur *r* des éléments de " "*iterable*." #: ../Doc/library/itertools.rst:490 msgid "" "If *r* is not specified or is ``None``, then *r* defaults to the length of " "the *iterable* and all possible full-length permutations are generated." msgstr "" "Si *r* n'est pas spécifié ou vaut ``None``, alors *r* a pour valeur la " "longueur de *iterable* et toutes les permutations de longueur *r* possibles " "sont générées." #: ../Doc/library/itertools.rst:494 msgid "" "Permutations are emitted in lexicographic sort order. So, if the input " "*iterable* is sorted, the permutation tuples will be produced in sorted " "order." msgstr "" "Les permutations sont émises dans l'ordre lexicographique. Ainsi, si " "l'itérable d'entrée *iterable* est trié, les *tuples* de permutation seront " "produits dans l'ordre." #: ../Doc/library/itertools.rst:498 msgid "" "Elements are treated as unique based on their position, not on their value. " "So if the input elements are unique, there will be no repeat values in each " "permutation." msgstr "" "Les éléments sont considérés comme uniques en fonction de leur position, et " "non pas de leur valeur. Ainsi, si l'élément est unique, il n'y aura pas de " "valeurs répétées dans chaque permutation." #: ../Doc/library/itertools.rst:529 msgid "" "The code for :func:`permutations` can be also expressed as a subsequence of :" "func:`product`, filtered to exclude entries with repeated elements (those " "from the same position in the input pool)::" msgstr "" "Le code pour :func:`permutations` peut aussi être exprimé comme une sous-" "séquence de :func:`product`, filtré pour exclure les entrées avec des " "éléments répétés (celles de la même position dans la *pool* d'entrée) : ::" #: ../Doc/library/itertools.rst:541 msgid "" "The number of items returned is ``n! / (n-r)!`` when ``0 <= r <= n`` or zero " "when ``r > n``." msgstr "" "Le nombre d'éléments renvoyés est ``n! / (n-r)!`` quand ``0 <= r <= n`` ou " "zéro quand ``r > n``." #: ../Doc/library/itertools.rst:548 msgid "Cartesian product of input iterables." msgstr "Produit cartésien des itérables d'entrée." #: ../Doc/library/itertools.rst:550 msgid "" "Roughly equivalent to nested for-loops in a generator expression. For " "example, ``product(A, B)`` returns the same as ``((x,y) for x in A for y in " "B)``." msgstr "" "Sensiblement équivalent à des boucles *for* imbriquées dans une expression " "de générateur. Par exemple ``product(A, B)`` renvoie la même chose que " "``((x, y) for x in A for y in B)``." #: ../Doc/library/itertools.rst:553 msgid "" "The nested loops cycle like an odometer with the rightmost element advancing " "on every iteration. This pattern creates a lexicographic ordering so that " "if the input's iterables are sorted, the product tuples are emitted in " "sorted order." msgstr "" "Les boucles imbriquées tournent comme un compteur kilométrique avec " "l'élément le plus à droite avançant à chaque itération. ce motif créé un tri " "lexicographique afin que si les itérables de l'entrée sont triés, les " "*tuples* de produit sont émis dans l'ordre." #: ../Doc/library/itertools.rst:558 msgid "" "To compute the product of an iterable with itself, specify the number of " "repetitions with the optional *repeat* keyword argument. For example, " "``product(A, repeat=4)`` means the same as ``product(A, A, A, A)``." msgstr "" "Pour générer le produit d'un itérable avec lui-même, spécifier le nombre de " "répétitions avec le paramètre nommé optionnel *repeat*. Par exemple, " "``product(A, repeat=4)`` veut dire la même chose que ``product(A, A, A, A)``." #: ../Doc/library/itertools.rst:562 msgid "" "This function is roughly equivalent to the following code, except that the " "actual implementation does not build up intermediate results in memory::" msgstr "" "Cette fonction est sensiblement équivalente au code suivant, saut que la " "vraie implémentation ne créé pas les résultats intermédiaires en mémoire : ::" #: ../Doc/library/itertools.rst:579 msgid "" "Make an iterator that returns *object* over and over again. Runs " "indefinitely unless the *times* argument is specified. Used as argument to :" "func:`imap` for invariant function parameters. Also used with :func:`izip` " "to create constant fields in a tuple record. Roughly equivalent to::" msgstr "" #: ../Doc/library/itertools.rst:593 msgid "" "A common use for *repeat* is to supply a stream of constant values to *imap* " "or *zip*::" msgstr "" #: ../Doc/library/itertools.rst:601 msgid "" "Make an iterator that computes the function using arguments obtained from " "the iterable. Used instead of :func:`imap` when argument parameters are " "already grouped in tuples from a single iterable (the data has been \"pre-" "zipped\"). The difference between :func:`imap` and :func:`starmap` " "parallels the distinction between ``function(a,b)`` and ``function(*c)``. " "Roughly equivalent to::" msgstr "" #: ../Doc/library/itertools.rst:612 msgid "" "Previously, :func:`starmap` required the function arguments to be tuples. " "Now, any iterable is allowed." msgstr "" #: ../Doc/library/itertools.rst:618 msgid "" "Make an iterator that returns elements from the iterable as long as the " "predicate is true. Roughly equivalent to::" msgstr "" "Créer un itérateur qui renvoie les éléments d'un itérable tant que le " "prédicat est vrai. Sensiblement équivalent à : ::" #: ../Doc/library/itertools.rst:632 msgid "" "Return *n* independent iterators from a single iterable. Roughly equivalent " "to::" msgstr "" #: ../Doc/library/itertools.rst:646 msgid "" "Once :func:`tee` has made a split, the original *iterable* should not be " "used anywhere else; otherwise, the *iterable* could get advanced without the " "tee objects being informed." msgstr "" "Une fois que :func:`tee` a créé un branchement, l'itérable *iterable* ne " "devrait être utilisé nulle part ailleurs ; sinon, *iterable* pourrait être " "avancé sans que les objets tee soient informés." #: ../Doc/library/itertools.rst:650 msgid "" "This itertool may require significant auxiliary storage (depending on how " "much temporary data needs to be stored). In general, if one iterator uses " "most or all of the data before another iterator starts, it is faster to use :" "func:`list` instead of :func:`tee`." msgstr "" "Cet outil pourrait avoir besoin d'un stockage auxiliaire important (en " "fonction de la taille des données temporaires nécessaires). En général, si " "un itérateur utilise la majorité ou toute la donnée avant qu'un autre " "itérateur ne commence, il est plus rapide d'utiliser :func:`list` à la place " "de :func:`tee`." #: ../Doc/library/itertools.rst:661 msgid "Recipes" msgstr "Cas pratiques" #: ../Doc/library/itertools.rst:663 msgid "" "This section shows recipes for creating an extended toolset using the " "existing itertools as building blocks." msgstr "" "Cette section montre des recettes pour créer une boîte à outil étendue en se " "servant des *itertools* existants comme de briques." #: ../Doc/library/itertools.rst:666 msgid "" "The extended tools offer the same high performance as the underlying " "toolset. The superior memory performance is kept by processing elements one " "at a time rather than bringing the whole iterable into memory all at once. " "Code volume is kept small by linking the tools together in a functional " "style which helps eliminate temporary variables. High speed is retained by " "preferring \"vectorized\" building blocks over the use of for-loops and :" "term:`generator`\\s which incur interpreter overhead." msgstr "" "Ces outils dérivés offrent la même bonne performance que les outils sous-" "jacents. La performance mémoire supérieure est gardée en traitant les " "éléments un à la fois plutôt que de charger tout l'itérable en mémoire en " "même temps. Le volume de code reste bas grâce à un chaînage de style " "fonctionnel qui aide à éliminer des variables temporaires. La grande vitesse " "est gardée en préférant les briques \"vectorisées\" plutôt que les boucles " "*for* et les :term:`générateur`\\s qui engendrent du sur-coût de traitement." #: ../Doc/library/itertools.rst:848 msgid "" "Note, many of the above recipes can be optimized by replacing global lookups " "with local variables defined as default values. For example, the " "*dotproduct* recipe can be written as::" msgstr "" "Note, beaucoup des recettes ci-dessus peuvent être optimisées en replaçant " "les recherches globales par des recherches locales avec des variables " "locales définies comme des valeurs par défaut. Par exemple, la recette " "*dotproduct* peut être écrite comme : ::"