forked from AFPy/python-docs-fr
Add initial translation of c-api/tuple.po
Je n'ai pas trouvé de traduction claire pour *struct sequence*, l'équivalent C des namedtuple et je l'ai donc laissé en italique. J'ai aussi conservé tuple dans le texte au lieu d'utiliser n-uplet dont l'usage est courant en mathématiques car tuple me semble plus naturel dans le contexte du code C. J'ai ajouté une référence vers la classe à chaque fois pour indiquer qu'on parle bien de la classe tuple et pas du concept de n-uplet.
This commit is contained in:
parent
92e43cb2cb
commit
590626c540
188
c-api/tuple.po
188
c-api/tuple.po
|
@ -6,8 +6,8 @@ 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: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2023-02-19 11:26+0100\n"
|
||||
"Last-Translator: Rémi Lapeyre <remi.lapeyre@lenstra.fr>\n"
|
||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
@ -16,38 +16,42 @@ msgstr ""
|
|||
|
||||
#: c-api/tuple.rst:6
|
||||
msgid "Tuple Objects"
|
||||
msgstr ""
|
||||
msgstr "Objets *tuple*"
|
||||
|
||||
#: c-api/tuple.rst:13
|
||||
#, fuzzy
|
||||
msgid "This subtype of :c:type:`PyObject` represents a Python tuple object."
|
||||
msgstr ""
|
||||
"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python."
|
||||
"Ce sous-type de :c:type:`PyObject` représente un objet Python ``tuple``."
|
||||
|
||||
#: c-api/tuple.rst:18
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python tuple type; it "
|
||||
"is the same object as :class:`tuple` in the Python layer."
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python tuple type; it"
|
||||
" is the same object as :class:`tuple` in the Python layer."
|
||||
msgstr ""
|
||||
"Cette instance de :c:type:`PyTypeObject` représente le type Python "
|
||||
"*bytearray*, c'est le même que :class:`bytearray` côté Python."
|
||||
"Cette instance de :c:type:`PyTypeObject` représente le type Python :class:`tuple`, "
|
||||
"c'est le même que l’objet Python :class:`tuple`."
|
||||
|
||||
#: c-api/tuple.rst:24
|
||||
msgid ""
|
||||
"Return true if *p* is a tuple object or an instance of a subtype of the "
|
||||
"tuple type. This function always succeeds."
|
||||
msgstr ""
|
||||
"Renvoie *true* si *p* est un objet :class:`tuple` ou un instance d’un de ses"
|
||||
" sous-type. Cette fonction n’échoue jamais. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:30
|
||||
msgid ""
|
||||
"Return true if *p* is a tuple object, but not an instance of a subtype of "
|
||||
"the tuple type. This function always succeeds."
|
||||
msgstr ""
|
||||
"Renvoie *true* si *p* est un :class:`tuple`, mais pas une instance d’un des "
|
||||
"sous-types de :class:`tuple`. Cette fonction n’échoue jamais. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:36
|
||||
msgid "Return a new tuple object of size *len*, or ``NULL`` on failure."
|
||||
msgstr ""
|
||||
"Renvoie un nouvel objet :class:`tuple` de taille *len*, ou ``NULL`` en cas "
|
||||
"d’échec. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:41
|
||||
msgid ""
|
||||
|
@ -56,34 +60,50 @@ msgid ""
|
|||
"objects. ``PyTuple_Pack(2, a, b)`` is equivalent to "
|
||||
"``Py_BuildValue(\"(OO)\", a, b)``."
|
||||
msgstr ""
|
||||
"Renvoie un nouveau :class:`tuple` de taille *n*, ou ``NULL`` en cas d’échec."
|
||||
" Les éléments du :class:`tuple` sont les *n* arguments de la fonction C et "
|
||||
"doivent pointer vers des objets Python. ``PyTuple_Pack(2, a, b)`` est "
|
||||
"équivalent à ``Py_BuildValue(\"(OO)\", a, b)``. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:48
|
||||
msgid "Take a pointer to a tuple object, and return the size of that tuple."
|
||||
msgstr ""
|
||||
msgstr "Renvoie la taille du :class:`tuple` *p*. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:53
|
||||
msgid ""
|
||||
"Return the size of the tuple *p*, which must be non-``NULL`` and point to a "
|
||||
"tuple; no error checking is performed."
|
||||
msgstr ""
|
||||
"Renvoie la taille du :class:`tuple` *p*, qui ne doit pas être ``NULL``. "
|
||||
"Cette fonction ne vérifie pas ses arguments et *p* doit impérativement être "
|
||||
"un :class:`tuple`. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:59
|
||||
msgid ""
|
||||
"Return the object at position *pos* in the tuple pointed to by *p*. If "
|
||||
"*pos* is negative or out of bounds, return ``NULL`` and set an :exc:"
|
||||
"`IndexError` exception."
|
||||
"*pos* is negative or out of bounds, return ``NULL`` and set an "
|
||||
":exc:`IndexError` exception."
|
||||
msgstr ""
|
||||
"Renvoie l’objet à la position *pos* dans le :class:`tuple` *p*. Si *pos* est"
|
||||
" négatif ou TODO, ``NULL`` est renvoyé et l’exception :exc:`IndexError` est "
|
||||
"renvoyée. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:65
|
||||
msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments."
|
||||
msgstr ""
|
||||
"Similaire à la fonction :c:func:`PyTuple_GetItem`, mais ne contrôle pas les "
|
||||
"arguments."
|
||||
|
||||
#: c-api/tuple.rst:70
|
||||
msgid ""
|
||||
"Return the slice of the tuple pointed to by *p* between *low* and *high*, or "
|
||||
"``NULL`` on failure. This is the equivalent of the Python expression "
|
||||
"Return the slice of the tuple pointed to by *p* between *low* and *high*, or"
|
||||
" ``NULL`` on failure. This is the equivalent of the Python expression "
|
||||
"``p[low:high]``. Indexing from the end of the list is not supported."
|
||||
msgstr ""
|
||||
"Renvoie une *slice* des éléments du :class:`tuple` *p* entre *low* et "
|
||||
"*high*, ou ``NULL`` en cas d’échec. Cette fonction est équivalente à "
|
||||
"l’expression Python ``p[low:high]``. Les index négatifs, par rapport au "
|
||||
"dernier élément du :class:`tuple`, ne sont pas supportés. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:77
|
||||
msgid ""
|
||||
|
@ -91,73 +111,109 @@ msgid ""
|
|||
"by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` "
|
||||
"and set an :exc:`IndexError` exception."
|
||||
msgstr ""
|
||||
"Insère une référence à l’objet *o* à la position *pos* du :class:`tuple` "
|
||||
"pointé par *p*. Renvoie ``0`` si l’opération réussit. Si *pos* est hors "
|
||||
"limite, l’exception :exc:`IndexError` est levée et ``-1`` est renvoyé. # "
|
||||
"noqa"
|
||||
|
||||
#: c-api/tuple.rst:83
|
||||
msgid ""
|
||||
"This function \"steals\" a reference to *o* and discards a reference to an "
|
||||
"item already in the tuple at the affected position."
|
||||
msgstr ""
|
||||
"Cette fonction « s’accapare » une référence à l’objet *o* et dé-référence "
|
||||
"l’objet présent dans le :class:`tuple` à cette position. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:89
|
||||
msgid ""
|
||||
"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should "
|
||||
"*only* be used to fill in brand new tuples."
|
||||
msgstr ""
|
||||
"Semblable à la fonction :c:func:`PyTuple_SetItem`, mais ne contrôle pas les "
|
||||
"erreurs et *ne doit être utilisé que* pour remplir un :class:`tuple` "
|
||||
"nouvellement créé. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:94
|
||||
msgid ""
|
||||
"This function \"steals\" a reference to *o*, and, unlike :c:func:"
|
||||
"`PyTuple_SetItem`, does *not* discard a reference to any item that is being "
|
||||
"replaced; any reference in the tuple at position *pos* will be leaked."
|
||||
"This function \"steals\" a reference to *o*, and, unlike "
|
||||
":c:func:`PyTuple_SetItem`, does *not* discard a reference to any item that "
|
||||
"is being replaced; any reference in the tuple at position *pos* will be "
|
||||
"leaked."
|
||||
msgstr ""
|
||||
"Cette fonction « s’accapare » une référence à l’objet *o* et, contrairement"
|
||||
" à :c:func:`PyTuple_SetItem`, ne dé-référence pas l’élément remplacé : la "
|
||||
"référence à l’objet présent dans le :class:`tuple` à la position *pos* sera "
|
||||
"perdue. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:102
|
||||
msgid ""
|
||||
"Can be used to resize a tuple. *newsize* will be the new length of the "
|
||||
"tuple. Because tuples are *supposed* to be immutable, this should only be "
|
||||
"used if there is only one reference to the object. Do *not* use this if the "
|
||||
"tuple may already be known to some other part of the code. The tuple will "
|
||||
"always grow or shrink at the end. Think of this as destroying the old tuple "
|
||||
"and creating a new one, only more efficiently. Returns ``0`` on success. "
|
||||
"used if there is only one reference to the object. Do *not* use this if the"
|
||||
" tuple may already be known to some other part of the code. The tuple will "
|
||||
"always grow or shrink at the end. Think of this as destroying the old tuple"
|
||||
" and creating a new one, only more efficiently. Returns ``0`` on success. "
|
||||
"Client code should never assume that the resulting value of ``*p`` will be "
|
||||
"the same as before calling this function. If the object referenced by ``*p`` "
|
||||
"is replaced, the original ``*p`` is destroyed. On failure, returns ``-1`` "
|
||||
"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` or :exc:"
|
||||
"`SystemError`."
|
||||
"the same as before calling this function. If the object referenced by ``*p``"
|
||||
" is replaced, the original ``*p`` is destroyed. On failure, returns ``-1`` "
|
||||
"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` or "
|
||||
":exc:`SystemError`."
|
||||
msgstr ""
|
||||
"Permet de redimensionner un :class:`tuple`. *newsize* est la nouvelle taille"
|
||||
" de ce :class:`tuple`. Comme les :class:`tuple` sont *supposés* être "
|
||||
"immutable cette fonction doit être utilisée uniquement s’il n’existe qu’une "
|
||||
"référence vers cet objet. *N’utilisez pas* cette fonction s’il est possible "
|
||||
"que le :class:`tuple` soit connu d’une autre partie du code. Le "
|
||||
":class:`tuple` sera toujours agrandi ou réduit à partir de la fin. Cette "
|
||||
"fonction est plus performante que de détruire le :class:`tuple` puis d’en "
|
||||
"créer un nouveau. Renvoie ``0`` si l’opération réussit. Le code ne devrait "
|
||||
"jamais supposer que la valeur de ``*p`` sera la même après l’appel à cette "
|
||||
"fonction. Si l’objet référencé par ``*p`` doit être remplacé, alors il est "
|
||||
"d’abord détruit. En cas d’erreur cette fonction renvoie ``-1`` , stocke "
|
||||
"``NULL`` dans ``*p`` et lève l’exception :exc:`MemoryError` ou "
|
||||
":exc:`SystemError`. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:115
|
||||
msgid "Struct Sequence Objects"
|
||||
msgstr ""
|
||||
msgstr "Objets *struct sequence*"
|
||||
|
||||
#: c-api/tuple.rst:117
|
||||
msgid ""
|
||||
"Struct sequence objects are the C equivalent of :func:`~collections."
|
||||
"namedtuple` objects, i.e. a sequence whose items can also be accessed "
|
||||
"through attributes. To create a struct sequence, you first have to create a "
|
||||
"specific struct sequence type."
|
||||
"Struct sequence objects are the C equivalent of "
|
||||
":func:`~collections.namedtuple` objects, i.e. a sequence whose items can "
|
||||
"also be accessed through attributes. To create a struct sequence, you first "
|
||||
"have to create a specific struct sequence type."
|
||||
msgstr ""
|
||||
"Les objets *struct sequence* sont l’équivalent C des objets "
|
||||
":func:`~collections.namedtuple`, c’est-à-dire une suite d’objets dont les "
|
||||
"éléments peuvent être désignés par des attributs. Pour créer un objet "
|
||||
"*struct sequence* vous devez d’abord définir son type."
|
||||
|
||||
#: c-api/tuple.rst:124
|
||||
msgid ""
|
||||
"Create a new struct sequence type from the data in *desc*, described below. "
|
||||
"Instances of the resulting type can be created with :c:func:"
|
||||
"`PyStructSequence_New`."
|
||||
"Instances of the resulting type can be created with "
|
||||
":c:func:`PyStructSequence_New`."
|
||||
msgstr ""
|
||||
"Créé un nouveau type d’objet *struct sequence* à partir des données dans "
|
||||
"*desc*, décrit ci-dessous. Le type ainsi créé peut être instancié en "
|
||||
"appelant :c:func:`PyStructSequence_New`."
|
||||
|
||||
#: c-api/tuple.rst:130
|
||||
msgid "Initializes a struct sequence type *type* from *desc* in place."
|
||||
msgstr ""
|
||||
msgstr "Initialise un type *struct sequence* à partir de *desc* « en-ligne »."
|
||||
|
||||
#: c-api/tuple.rst:135
|
||||
msgid ""
|
||||
"The same as ``PyStructSequence_InitType``, but returns ``0`` on success and "
|
||||
"``-1`` on failure."
|
||||
msgstr ""
|
||||
"Identique à ``PyStructSequence_InitType`` mais renvoie ``0`` si l’opération "
|
||||
"réussit et ``-1`` en cas d’erreur."
|
||||
|
||||
#: c-api/tuple.rst:143
|
||||
msgid "Contains the meta information of a struct sequence type to create."
|
||||
msgstr ""
|
||||
msgstr "Contient les méta-données d’un type *struct sequence* à créer."
|
||||
|
||||
#: c-api/tuple.rst:169
|
||||
msgid "Field"
|
||||
|
@ -177,23 +233,23 @@ msgstr "``name``"
|
|||
|
||||
#: c-api/tuple.rst:150 c-api/tuple.rst:176
|
||||
msgid "``const char *``"
|
||||
msgstr ""
|
||||
msgstr "``const char *``"
|
||||
|
||||
#: c-api/tuple.rst:148
|
||||
msgid "name of the struct sequence type"
|
||||
msgstr ""
|
||||
msgstr "nom du type *struct sequence*"
|
||||
|
||||
#: c-api/tuple.rst:176
|
||||
msgid "``doc``"
|
||||
msgstr ""
|
||||
msgstr "``doc``"
|
||||
|
||||
#: c-api/tuple.rst:150
|
||||
msgid "pointer to docstring for the type or ``NULL`` to omit"
|
||||
msgstr ""
|
||||
msgstr "pointeur vers une *docstring* pour le type ou ``NULL`` pour l’omettre"
|
||||
|
||||
#: c-api/tuple.rst:153
|
||||
msgid "``fields``"
|
||||
msgstr ""
|
||||
msgstr "``fields``"
|
||||
|
||||
#: c-api/tuple.rst:153
|
||||
msgid "``PyStructSequence_Field *``"
|
||||
|
@ -202,6 +258,8 @@ msgstr "``PyStructSequence_Field *``"
|
|||
#: c-api/tuple.rst:153
|
||||
msgid "pointer to ``NULL``-terminated array with field names of the new type"
|
||||
msgstr ""
|
||||
"pointeur vers un tableau terminé par ``NULL`` définissant les champs du "
|
||||
"nouveau type"
|
||||
|
||||
#: c-api/tuple.rst:156
|
||||
msgid "``n_in_sequence``"
|
||||
|
@ -214,62 +272,80 @@ msgstr "``int``"
|
|||
#: c-api/tuple.rst:156
|
||||
msgid "number of fields visible to the Python side (if used as tuple)"
|
||||
msgstr ""
|
||||
"nombre de champs exposés en Python lorsque l’objet est utilisé en tant que "
|
||||
":class:`tuple` # noqa"
|
||||
|
||||
#: c-api/tuple.rst:163
|
||||
msgid ""
|
||||
"Describes a field of a struct sequence. As a struct sequence is modeled as a "
|
||||
"tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :attr:"
|
||||
"`fields` array of the :c:type:`PyStructSequence_Desc` determines which field "
|
||||
"of the struct sequence is described."
|
||||
"Describes a field of a struct sequence. As a struct sequence is modeled as a"
|
||||
" tuple, all fields are typed as :c:expr:`PyObject*`. The index in the "
|
||||
":attr:`fields` array of the :c:type:`PyStructSequence_Desc` determines which"
|
||||
" field of the struct sequence is described."
|
||||
msgstr ""
|
||||
"Décrit un champ d’un objet *struct sequence*. Comme les objet *struct "
|
||||
"sequence* sont en fait des :class:`tuple` tous les champs ont le type "
|
||||
":c:expr:`PyObject*`. L’index au sein du tableau :attr:`fields` de "
|
||||
":c:type:`PyStructSequence_Desc` correspond au champ de l’objet *struct "
|
||||
"sequence* décrit. # noqa"
|
||||
|
||||
#: c-api/tuple.rst:171
|
||||
msgid ""
|
||||
"name for the field or ``NULL`` to end the list of named fields, set to :c:"
|
||||
"data:`PyStructSequence_UnnamedField` to leave unnamed"
|
||||
"name for the field or ``NULL`` to end the list of named fields, set to "
|
||||
":c:data:`PyStructSequence_UnnamedField` to leave unnamed"
|
||||
msgstr ""
|
||||
"le nom de ce champ, ou ``NULL`` pour signaler la fin des champs nommés, "
|
||||
"utilisez :c:data:`PyStructSequence_UnnamedField` pour ne pas nommer le champ"
|
||||
|
||||
#: c-api/tuple.rst:176
|
||||
msgid "field docstring or ``NULL`` to omit"
|
||||
msgstr ""
|
||||
msgstr "la *docstring* pour ce champ ou ``NULL`` pour l’omettre "
|
||||
|
||||
#: c-api/tuple.rst:182
|
||||
msgid "Special value for a field name to leave it unnamed."
|
||||
msgstr ""
|
||||
msgstr "Une valeur sentinelle pour indiquer qu’un champ n’est pas nommé."
|
||||
|
||||
#: c-api/tuple.rst:184
|
||||
msgid "The type was changed from ``char *``."
|
||||
msgstr ""
|
||||
msgstr "Le type était ``char *``."
|
||||
|
||||
#: c-api/tuple.rst:190
|
||||
msgid ""
|
||||
"Creates an instance of *type*, which must have been created with :c:func:"
|
||||
"`PyStructSequence_NewType`."
|
||||
"Creates an instance of *type*, which must have been created with "
|
||||
":c:func:`PyStructSequence_NewType`."
|
||||
msgstr ""
|
||||
"Créé une instance de *type*, qui doit avoir été créé via "
|
||||
":c:func:`PyStructSequence_NewType`."
|
||||
|
||||
#: c-api/tuple.rst:196
|
||||
msgid ""
|
||||
"Return the object at position *pos* in the struct sequence pointed to by "
|
||||
"*p*. No bounds checking is performed."
|
||||
msgstr ""
|
||||
"Renvoie l’objet à la position *pos* dans le *struct sequence* pointé par "
|
||||
"*p*. *pos* ne doit pas être hors limite."
|
||||
|
||||
#: c-api/tuple.rst:202
|
||||
msgid "Macro equivalent of :c:func:`PyStructSequence_GetItem`."
|
||||
msgstr ""
|
||||
msgstr "Macro équivalente à :c:func:`PyStructSequence_GetItem`."
|
||||
|
||||
#: c-api/tuple.rst:207
|
||||
msgid ""
|
||||
"Sets the field at index *pos* of the struct sequence *p* to value *o*. "
|
||||
"Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand "
|
||||
"new instances."
|
||||
"Sets the field at index *pos* of the struct sequence *p* to value *o*. Like"
|
||||
" :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand new "
|
||||
"instances."
|
||||
msgstr ""
|
||||
"Insère un l’objet *o* dans le *struct sequence* *p* à la position *pos*. "
|
||||
"Pour les mêmes raisons que :c:func:`PyTuple_SET_ITEM`, cette fonction ne "
|
||||
"doit être utilisée que pour des objets nouvellement créés."
|
||||
|
||||
#: c-api/tuple.rst:223
|
||||
msgid "This function \"steals\" a reference to *o*."
|
||||
msgstr ""
|
||||
msgstr "Cette fonction « s’accapare » une référence à *o*."
|
||||
|
||||
#: c-api/tuple.rst:218
|
||||
msgid ""
|
||||
"Similar to :c:func:`PyStructSequence_SetItem`, but implemented as a static "
|
||||
"inlined function."
|
||||
msgstr ""
|
||||
"Semblable à :c:func:`PyStructSequence_SetItem` mais implémenté en tant que "
|
||||
"fonction statique en-ligne."
|
||||
|
|
Loading…
Reference in New Issue