python-docs-fr/library/functools.po

239 lines
10 KiB
Plaintext
Raw 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.

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 1990-2016, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../Doc/library/functools.rst:2
msgid ""
":mod:`functools` --- Higher-order functions and operations on callable "
"objects"
msgstr ""
":mod:`functools` --- Fonctions de haut niveau et opérations sur des objets "
"appelables"
#: ../Doc/library/functools.rst:13
msgid "**Source code:** :source:`Lib/functools.py`"
msgstr "**Code source :** :source:`Lib/functools.py`"
#: ../Doc/library/functools.rst:17
msgid ""
"The :mod:`functools` module is for higher-order functions: functions that "
"act on or return other functions. In general, any callable object can be "
"treated as a function for the purposes of this module."
msgstr ""
"Le module :mod:`functools` est utilisé pour des fonctions de haut niveau : "
"des fonctions qui agissent sur ou revoient d'autres fonctions. En général, "
"tout objet appelable peut être utilisé comme une fonction pour les besoins "
"de ce module."
#: ../Doc/library/functools.rst:21
msgid "The :mod:`functools` module defines the following functions:"
msgstr "Le module :mod:`functools` définit les fonctions suivantes :"
#: ../Doc/library/functools.rst:25
msgid ""
"Transform an old-style comparison function to a :term:`key function`. Used "
"with tools that accept key functions (such as :func:`sorted`, :func:`min`, :"
"func:`max`, :func:`heapq.nlargest`, :func:`heapq.nsmallest`, :func:"
"`itertools.groupby`). This function is primarily used as a transition tool "
"for programs being converted to Python 3 where comparison functions are no "
"longer supported."
msgstr ""
#: ../Doc/library/functools.rst:32
msgid ""
"A comparison function is any callable that accept two arguments, compares "
"them, and returns a negative number for less-than, zero for equality, or a "
"positive number for greater-than. A key function is a callable that accepts "
"one argument and returns another value to be used as the sort key."
msgstr ""
"Une fonction de comparaison est un appelable qui prend deux arguments, les "
"compare, et renvoie un nombre négatif pour l'infériorité, zéro pour "
"l'égalité ou un nombre positif pour la supériorité. Une fonction de clé est "
"un appelable qui prend un argument et retourne une autre valeur qui sera "
"utilisée comme clé de tri."
#: ../Doc/library/functools.rst:37
msgid "Example::"
msgstr "Exemples ::"
#: ../Doc/library/functools.rst:41
msgid ""
"For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`."
msgstr ""
"Pour des exemples de tris et un bref tutoriel, consultez :ref:`sortinghowto`."
#: ../Doc/library/functools.rst:48
msgid ""
"Given a class defining one or more rich comparison ordering methods, this "
"class decorator supplies the rest. This simplifies the effort involved in "
"specifying all of the possible rich comparison operations:"
msgstr ""
"A partir d'une classe définissant une ou plusieurs méthodes de comparaison "
"riches, ce décorateur de classe fournit le reste. Ceci simplifie l'effort à "
"fournir dans la spécification de toutes les opérations de comparaison riche :"
#: ../Doc/library/functools.rst:52
msgid ""
"The class must define one of :meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`, "
"or :meth:`__ge__`. In addition, the class should supply an :meth:`__eq__` "
"method."
msgstr ""
"La classe doit définir au moins une de ces méthodes :meth:`__lt__`, :meth:"
"`__le__`, :meth:`__gt__`, or :meth:`__ge__`. De plus, la classe doit fournir "
"une méthode :meth:`__eq__`."
#: ../Doc/library/functools.rst:56
msgid "For example::"
msgstr "Par exemple : ::"
#: ../Doc/library/functools.rst:71
msgid ""
"This is the same function as :func:`reduce`. It is made available in this "
"module to allow writing code more forward-compatible with Python 3."
msgstr ""
#: ../Doc/library/functools.rst:79
msgid ""
"Return a new :class:`partial` object which when called will behave like "
"*func* called with the positional arguments *args* and keyword arguments "
"*keywords*. If more arguments are supplied to the call, they are appended to "
"*args*. If additional keyword arguments are supplied, they extend and "
"override *keywords*. Roughly equivalent to::"
msgstr ""
"Retourne un nouvel objet :class:`partial` qui, quand il est appelé, "
"fonctionne comme *func* appelée avec les arguments positionels *args* et les "
"arguments nommés *keywords*. Si plus d'arguments sont fournis à l'appel, ils "
"sont ajoutés à *args*. Si plus d'arguments nommés sont fournis, ils étendent "
"et surchargent *keywords*. A peu près équivalent à ::"
#: ../Doc/library/functools.rst:95
msgid ""
"The :func:`partial` is used for partial function application which \"freezes"
"\" some portion of a function's arguments and/or keywords resulting in a new "
"object with a simplified signature. For example, :func:`partial` can be "
"used to create a callable that behaves like the :func:`int` function where "
"the *base* argument defaults to two:"
msgstr ""
":func:`partial` est utilisé pour une application de fonction partielle qui "
"\"gèle\" une portion des arguments et/ou mots-clés d'une fonction donnant un "
"nouvel objet avec une signature simplifiée. Par exemple, :func:`partial` "
"peut être utilisé pour créer un appelable qui se comporte comme la fonction :"
"func:`int` ou l'argument *base* est deux par défaut :"
#: ../Doc/library/functools.rst:110
msgid ""
"Update a *wrapper* function to look like the *wrapped* function. The "
"optional arguments are tuples to specify which attributes of the original "
"function are assigned directly to the matching attributes on the wrapper "
"function and which attributes of the wrapper function are updated with the "
"corresponding attributes from the original function. The default values for "
"these arguments are the module level constants *WRAPPER_ASSIGNMENTS* (which "
"assigns to the wrapper function's *__name__*, *__module__* and *__doc__*, "
"the documentation string) and *WRAPPER_UPDATES* (which updates the wrapper "
"function's *__dict__*, i.e. the instance dictionary)."
msgstr ""
#: ../Doc/library/functools.rst:120
msgid ""
"The main intended use for this function is in :term:`decorator` functions "
"which wrap the decorated function and return the wrapper. If the wrapper "
"function is not updated, the metadata of the returned function will reflect "
"the wrapper definition rather than the original function definition, which "
"is typically less than helpful."
msgstr ""
"La principale utilisation de cette fonction est dans les fonctions de :term:"
"`décoration <decorator>` qui englobent la fonction décorée et renvoie "
"l'englobeur. Si la fonction englobante n'est pas mise à jour, les "
"métadonnées de la fonction retournée reflèteront la définition de "
"l'englobeur au lieu de la définition de la fonction originale, qui souvent "
"peu utile."
#: ../Doc/library/functools.rst:129
msgid ""
"This is a convenience function for invoking :func:`update_wrapper` as a "
"function decorator when defining a wrapper function. It is equivalent to "
"``partial(update_wrapper, wrapped=wrapped, assigned=assigned, "
"updated=updated)``. For example::"
msgstr ""
"Ceci est une fonction d'aide pour appeler :func:`update_wrapper` comme "
"décorateur de fonction lors de la définition d'une fonction englobante. "
"C'est équivalent à ``partial(update_wrapper, wrapped=wrapped, "
"assigned=assigned, updated=updated)``. Par exemple ::"
#: ../Doc/library/functools.rst:155
msgid ""
"Without the use of this decorator factory, the name of the example function "
"would have been ``'wrapper'``, and the docstring of the original :func:"
"`example` would have been lost."
msgstr ""
"Sans l'utilisation de cette usine à décorateur, le nom de la fonction "
"d'exemple aurait été ``'wrapper'``, et la chaîne de documentation de la "
"fonction :func:`example` originale aurait été perdue."
#: ../Doc/library/functools.rst:163
msgid ":class:`partial` Objects"
msgstr "Objets :class:`partial`"
#: ../Doc/library/functools.rst:165
msgid ""
":class:`partial` objects are callable objects created by :func:`partial`. "
"They have three read-only attributes:"
msgstr ""
"Les objets :class:`partial` sont des objets appelables créés par :func:"
"`partial`. Ils ont trois attributs en lecture seule :"
#: ../Doc/library/functools.rst:171
msgid ""
"A callable object or function. Calls to the :class:`partial` object will be "
"forwarded to :attr:`func` with new arguments and keywords."
msgstr ""
"Un objet ou une fonction appelable. Les appels à l'objet :class:`partial` "
"seront transmis à :attr:`func` avec les nouveaux arguments et mots-clés."
#: ../Doc/library/functools.rst:177
msgid ""
"The leftmost positional arguments that will be prepended to the positional "
"arguments provided to a :class:`partial` object call."
msgstr ""
"Les arguments positionnels qui seront ajoutés avant les arguments fournis "
"lors de l'appel d'un objet :class:`partial`."
#: ../Doc/library/functools.rst:183
msgid ""
"The keyword arguments that will be supplied when the :class:`partial` object "
"is called."
msgstr ""
"Les arguments nommés qui seront fournis quand l'objet :class:`partial` est "
"appelé."
#: ../Doc/library/functools.rst:186
msgid ""
":class:`partial` objects are like :class:`function` objects in that they are "
"callable, weak referencable, and can have attributes. There are some "
"important differences. For instance, the :attr:`~definition.__name__` and :"
"attr:`__doc__` attributes are not created automatically. Also, :class:"
"`partial` objects defined in classes behave like static methods and do not "
"transform into bound methods during instance attribute look-up."
msgstr ""
"Les objets :class:`partial` sont comme des objets :class:`function` de par "
"le fait qu'il sont appelables, référençables, et peuvent avoir des "
"attributs. Il y a cependant des différences importantes. Par exemple, les "
"attributs :attr:`~definition.__name__` et :attr:`__doc__` ne sont pas créés "
"automatiquement. De plus, les objets :class:`partial` définis dans les "
"classes se comportent comme des méthodes statiques et ne se transforment pas "
"en méthodes liées durant la recherche d'attributs dans l'instance."