python-docs-fr/library/functools.po

184 lines
6.7 KiB
Plaintext
Raw Normal View History

2016-10-30 09:46:26 +00:00
# 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 ""
#: ../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 ""
#: ../Doc/library/functools.rst:21
msgid "The :mod:`functools` module defines the following functions:"
msgstr ""
#: ../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 ""
#: ../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 exemple 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 ""
#: ../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 ""
#: ../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 ""
#: ../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 ""
#: ../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 ""
#: ../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 ""
#: ../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 ""
#: ../Doc/library/functools.rst:163
msgid ":class:`partial` Objects"
msgstr ""
#: ../Doc/library/functools.rst:165
msgid ""
":class:`partial` objects are callable objects created by :func:`partial`. "
"They have three read-only attributes:"
msgstr ""
#: ../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 ""
#: ../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 ""
#: ../Doc/library/functools.rst:183
msgid ""
"The keyword arguments that will be supplied when the :class:`partial` object "
"is called."
msgstr ""
#: ../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 ""