traduction de Struct (#1121)

This commit is contained in:
Christophe Nanteuil 2020-01-24 09:39:00 +01:00 committed by Julien Palard
parent cadf361581
commit 967f43d971

View File

@ -6,22 +6,24 @@ msgstr ""
"Project-Id-Version: Python 3\n" "Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-04 11:33+0200\n" "POT-Creation-Date: 2019-09-04 11:33+0200\n"
"PO-Revision-Date: 2017-08-10 00:55+0200\n" "PO-Revision-Date: 2020-01-18 17:44+0100\n"
"Last-Translator: Julien Palard <julien@palard.fr>\n" "Last-Translator: Julien Palard <julien@palard.fr>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" "Language-Team: FRENCH <traductions@lists.afpy.org>\n"
"Language: fr\n" "Language: fr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.11\n" "X-Generator: Poedit 2.2.3\n"
#: ../Doc/library/struct.rst:2 #: ../Doc/library/struct.rst:2
msgid ":mod:`struct` --- Interpret bytes as packed binary data" msgid ":mod:`struct` --- Interpret bytes as packed binary data"
msgstr "" msgstr ""
":mod:`struct` — manipulation de données agrégées sous forme binaire comme "
"une séquence d'octets"
#: ../Doc/library/struct.rst:7 #: ../Doc/library/struct.rst:7
msgid "**Source code:** :source:`Lib/struct.py`" msgid "**Source code:** :source:`Lib/struct.py`"
msgstr "" msgstr "**Code source :** :source:`Lib/struct.py`"
#: ../Doc/library/struct.rst:15 #: ../Doc/library/struct.rst:15
msgid "" msgid ""
@ -32,7 +34,15 @@ msgid ""
"the layout of the C structs and the intended conversion to/from Python " "the layout of the C structs and the intended conversion to/from Python "
"values." "values."
msgstr "" msgstr ""
"Ce module effectue des conversions entre des valeurs Python et des "
"structures C représentées sous la forme de :class:`bytes` (séquences "
"d'octets) Python. Cela permet, entre autres, de manipuler des données "
"agrégées sous forme binaire dans des fichiers ou à travers des connecteurs "
"réseau. Il utilise :ref:`les chaînes de spécification de format <struct-"
"format-strings>` comme description de l'agencement des structures afin de "
"réaliser les conversions depuis et vers les valeurs Python."
# Pas de majuscule car suit un ':' dans la version affichée (« Note »).
#: ../Doc/library/struct.rst:23 #: ../Doc/library/struct.rst:23
msgid "" msgid ""
"By default, the result of packing a given C struct includes pad bytes in " "By default, the result of packing a given C struct includes pad bytes in "
@ -43,6 +53,15 @@ msgid ""
"or omit implicit pad bytes, use ``standard`` size and alignment instead of " "or omit implicit pad bytes, use ``standard`` size and alignment instead of "
"``native`` size and alignment: see :ref:`struct-alignment` for details." "``native`` size and alignment: see :ref:`struct-alignment` for details."
msgstr "" msgstr ""
"par défaut, le résultat de l'agrégation d'une structure C donnée comprend "
"des octets de bourrage afin de maintenir un alignement correct des types C "
"sous-jacents ; de la même manière, l'alignement est pris en compte lors de "
"la dissociation. Ce comportement a été choisi de manière à ce que les octets "
"d'une structure agrégée reproduisent exactement l'agencement en mémoire de "
"la structure C équivalente. Pour gérer des formats de données indépendants "
"de la plateforme ou omettre les octets implicites de bourrage, utilisez la "
"taille et l'alignement ``standard`` en lieu et place de la taille et "
"l'alignement ``native`` (voir :ref:`struct-alignment` pour les détails)."
#: ../Doc/library/struct.rst:31 #: ../Doc/library/struct.rst:31
msgid "" msgid ""
@ -54,20 +73,30 @@ msgid ""
"implement the buffer protocol, so that they can be read/filled without " "implement the buffer protocol, so that they can be read/filled without "
"additional copying from a :class:`bytes` object." "additional copying from a :class:`bytes` object."
msgstr "" msgstr ""
"Plusieurs fonctions de :mod:`struct` (et méthodes de :class:`Struct`) "
"prennent un argument *buffer*. Cet argument fait référence à des objets qui "
"implémentent :ref:`le protocole tampon <bufferobjects>` et qui proposent un "
"tampon soit en lecture seule, soit en lecture-écriture. Les types les plus "
"courants qui utilisent cette fonctionnalité sont :class:`bytes` et :class:"
"`bytearray`, mais beaucoup d'autres types qui peuvent être considérés comme "
"des tableaux d'octets implémentent le protocole tampon ; ils peuvent ainsi "
"être lus ou remplis depuis un objet :class:`bytes` sans faire de copie."
#: ../Doc/library/struct.rst:40 #: ../Doc/library/struct.rst:40
msgid "Functions and Exceptions" msgid "Functions and Exceptions"
msgstr "" msgstr "Fonctions et exceptions"
#: ../Doc/library/struct.rst:42 #: ../Doc/library/struct.rst:42
msgid "The module defines the following exception and functions:" msgid "The module defines the following exception and functions:"
msgstr "" msgstr "Le module définit les exceptions et fonctions suivantes :"
#: ../Doc/library/struct.rst:47 #: ../Doc/library/struct.rst:47
msgid "" msgid ""
"Exception raised on various occasions; argument is a string describing what " "Exception raised on various occasions; argument is a string describing what "
"is wrong." "is wrong."
msgstr "" msgstr ""
"Exception levée à plusieurs occasions ; l'argument est une chaîne qui décrit "
"ce qui ne va pas."
#: ../Doc/library/struct.rst:53 #: ../Doc/library/struct.rst:53
msgid "" msgid ""
@ -75,6 +104,9 @@ msgid ""
"to the format string *format*. The arguments must match the values required " "to the format string *format*. The arguments must match the values required "
"by the format exactly." "by the format exactly."
msgstr "" msgstr ""
"Renvoie un objet *bytes* contenant les valeurs *v1*, *v2*… agrégées "
"conformément à la chaîne de format *format*. Les arguments doivent "
"correspondre exactement aux valeurs requises par le format."
#: ../Doc/library/struct.rst:60 #: ../Doc/library/struct.rst:60
msgid "" msgid ""
@ -82,6 +114,9 @@ msgid ""
"write the packed bytes into the writable buffer *buffer* starting at " "write the packed bytes into the writable buffer *buffer* starting at "
"position *offset*. Note that *offset* is a required argument." "position *offset*. Note that *offset* is a required argument."
msgstr "" msgstr ""
"Agrège les valeurs *v1*, *v2*… conformément à la chaîne de format *format* "
"et écrit les octets agrégés dans le tampon *buffer*, en commençant à la "
"position *offset*. Notez que *offset* est un argument obligatoire."
#: ../Doc/library/struct.rst:67 #: ../Doc/library/struct.rst:67
msgid "" msgid ""
@ -90,6 +125,11 @@ msgid ""
"contains exactly one item. The buffer's size in bytes must match the size " "contains exactly one item. The buffer's size in bytes must match the size "
"required by the format, as reflected by :func:`calcsize`." "required by the format, as reflected by :func:`calcsize`."
msgstr "" msgstr ""
"Dissocie depuis le tampon *buffer* (en supposant que celui-ci a été agrégé "
"avec ``pack(format, …)``) à l'aide de la chaîne de format *format*. Le "
"résultat est un n-uplet, qui peut éventuellement ne contenir qu'un seul "
"élément. La taille de *buffer* en octets doit correspondre à la taille "
"requise par le format, telle que calculée par :func:`calcsize`."
#: ../Doc/library/struct.rst:75 #: ../Doc/library/struct.rst:75
msgid "" msgid ""
@ -98,6 +138,12 @@ msgid ""
"item. The buffer's size in bytes, starting at position *offset*, must be at " "item. The buffer's size in bytes, starting at position *offset*, must be at "
"least the size required by the format, as reflected by :func:`calcsize`." "least the size required by the format, as reflected by :func:`calcsize`."
msgstr "" msgstr ""
"Dissocie les éléments du tampon *buffer*, en commençant à la position "
"*offset*, conformément à la chaîne de format *format*. Le résultat est un n-"
"uplet, qui peut éventuellement ne contenir qu'un seul élément. La taille du "
"tampon en octets, en commençant à la position *offset*, doit être au moins "
"égale à la taille requise par le format, telle que calculée par :func:"
"`calcsize`."
#: ../Doc/library/struct.rst:83 #: ../Doc/library/struct.rst:83
msgid "" msgid ""
@ -107,20 +153,28 @@ msgid ""
"buffer's size in bytes must be a multiple of the size required by the " "buffer's size in bytes must be a multiple of the size required by the "
"format, as reflected by :func:`calcsize`." "format, as reflected by :func:`calcsize`."
msgstr "" msgstr ""
"Dissocie de manière itérative les éléments du tampon *buffer* conformément à "
"la chaîne de format *format*. Cette fonction renvoie un itérateur qui lit "
"des morceaux de taille fixe dans le tampon jusqu'à ce que tout le contenu "
"ait été consommé. La taille du tampon en octets doit être un multiple de la "
"taille requise par le format, telle que calculée par :func:`calcsize`."
#: ../Doc/library/struct.rst:89 #: ../Doc/library/struct.rst:89
msgid "Each iteration yields a tuple as specified by the format string." msgid "Each iteration yields a tuple as specified by the format string."
msgstr "" msgstr ""
"Chaque itération produit un n-uplet tel que spécifié par la chaîne de format."
#: ../Doc/library/struct.rst:96 #: ../Doc/library/struct.rst:96
msgid "" msgid ""
"Return the size of the struct (and hence of the bytes object produced by " "Return the size of the struct (and hence of the bytes object produced by "
"``pack(format, ...)``) corresponding to the format string *format*." "``pack(format, ...)``) corresponding to the format string *format*."
msgstr "" msgstr ""
"Renvoie la taille de la structure (et donc celle de l'objet *bytes* produit "
"par ``pack(format, ...)``) correspondant à la chaîne de format *format*."
#: ../Doc/library/struct.rst:103 #: ../Doc/library/struct.rst:103
msgid "Format Strings" msgid "Format Strings"
msgstr "" msgstr "Chaînes de spécification du format"
#: ../Doc/library/struct.rst:105 #: ../Doc/library/struct.rst:105
msgid "" msgid ""
@ -130,10 +184,16 @@ msgid ""
"addition, there are special characters for controlling the :ref:`struct-" "addition, there are special characters for controlling the :ref:`struct-"
"alignment`." "alignment`."
msgstr "" msgstr ""
"Les chaînes de spécification du format servent à définir l'agencement lors "
"de l'agrégation et la dissociation des données. Elles sont construites à "
"partir de :ref:`caractères de format <format-characters>`, qui spécifient le "
"type de donnée à agréger-dissocier. De plus, il existe des caractères "
"spéciaux pour contrôler :ref:`le boutisme, la taille et l'alignement <struct-"
"alignment>`."
#: ../Doc/library/struct.rst:114 #: ../Doc/library/struct.rst:114
msgid "Byte Order, Size, and Alignment" msgid "Byte Order, Size, and Alignment"
msgstr "" msgstr "Boutisme, taille et alignement"
#: ../Doc/library/struct.rst:116 #: ../Doc/library/struct.rst:116
msgid "" msgid ""
@ -141,6 +201,9 @@ msgid ""
"order, and properly aligned by skipping pad bytes if necessary (according to " "order, and properly aligned by skipping pad bytes if necessary (according to "
"the rules used by the C compiler)." "the rules used by the C compiler)."
msgstr "" msgstr ""
"Par défaut, les types C sont représentés dans le format et le boutisme "
"natifs de la machine ; ils sont alignés correctement en sautant des octets "
"si nécessaire (en fonction des règles utilisées par le compilateur C)."
#: ../Doc/library/struct.rst:127 #: ../Doc/library/struct.rst:127
msgid "" msgid ""
@ -148,6 +211,9 @@ msgid ""
"indicate the byte order, size and alignment of the packed data, according to " "indicate the byte order, size and alignment of the packed data, according to "
"the following table:" "the following table:"
msgstr "" msgstr ""
"Cependant, le premier caractère de la chaîne de format peut être utilisé "
"pour indiquer le boutisme, la taille et l'alignement des données agrégées, "
"conformément à la table suivante :"
#: ../Doc/library/struct.rst:132 #: ../Doc/library/struct.rst:132
msgid "Character" msgid "Character"
@ -155,15 +221,15 @@ msgstr "Caractère"
#: ../Doc/library/struct.rst:132 #: ../Doc/library/struct.rst:132
msgid "Byte order" msgid "Byte order"
msgstr "" msgstr "Boutisme"
#: ../Doc/library/struct.rst:132 #: ../Doc/library/struct.rst:132
msgid "Size" msgid "Size"
msgstr "" msgstr "Taille"
#: ../Doc/library/struct.rst:132 #: ../Doc/library/struct.rst:132
msgid "Alignment" msgid "Alignment"
msgstr "" msgstr "Alignement"
#: ../Doc/library/struct.rst:134 #: ../Doc/library/struct.rst:134
msgid "``@``" msgid "``@``"
@ -171,7 +237,7 @@ msgstr "``@``"
#: ../Doc/library/struct.rst:134 ../Doc/library/struct.rst:136 #: ../Doc/library/struct.rst:134 ../Doc/library/struct.rst:136
msgid "native" msgid "native"
msgstr "" msgstr "natif"
#: ../Doc/library/struct.rst:136 #: ../Doc/library/struct.rst:136
msgid "``=``" msgid "``=``"
@ -180,12 +246,12 @@ msgstr "``=``"
#: ../Doc/library/struct.rst:136 ../Doc/library/struct.rst:138 #: ../Doc/library/struct.rst:136 ../Doc/library/struct.rst:138
#: ../Doc/library/struct.rst:140 ../Doc/library/struct.rst:142 #: ../Doc/library/struct.rst:140 ../Doc/library/struct.rst:142
msgid "standard" msgid "standard"
msgstr "" msgstr "standard"
#: ../Doc/library/struct.rst:136 ../Doc/library/struct.rst:138 #: ../Doc/library/struct.rst:136 ../Doc/library/struct.rst:138
#: ../Doc/library/struct.rst:140 ../Doc/library/struct.rst:142 #: ../Doc/library/struct.rst:140 ../Doc/library/struct.rst:142
msgid "none" msgid "none"
msgstr "" msgstr "aucun"
#: ../Doc/library/struct.rst:138 #: ../Doc/library/struct.rst:138
msgid "``<``" msgid "``<``"
@ -193,7 +259,7 @@ msgstr "``<``"
#: ../Doc/library/struct.rst:138 #: ../Doc/library/struct.rst:138
msgid "little-endian" msgid "little-endian"
msgstr "" msgstr "petit-boutiste"
#: ../Doc/library/struct.rst:140 #: ../Doc/library/struct.rst:140
msgid "``>``" msgid "``>``"
@ -201,7 +267,7 @@ msgstr "``>``"
#: ../Doc/library/struct.rst:140 #: ../Doc/library/struct.rst:140
msgid "big-endian" msgid "big-endian"
msgstr "" msgstr "gros-boutiste"
#: ../Doc/library/struct.rst:142 #: ../Doc/library/struct.rst:142
msgid "``!``" msgid "``!``"
@ -209,11 +275,13 @@ msgstr "``!``"
#: ../Doc/library/struct.rst:142 #: ../Doc/library/struct.rst:142
msgid "network (= big-endian)" msgid "network (= big-endian)"
msgstr "" msgstr "réseau (= gros-boutiste)"
#: ../Doc/library/struct.rst:145 #: ../Doc/library/struct.rst:145
msgid "If the first character is not one of these, ``'@'`` is assumed." msgid "If the first character is not one of these, ``'@'`` is assumed."
msgstr "" msgstr ""
"Si le premier caractère n'est pas dans cette liste, le module se comporte "
"comme si ``'@'`` avait été indiqué."
#: ../Doc/library/struct.rst:147 #: ../Doc/library/struct.rst:147
msgid "" msgid ""
@ -223,36 +291,54 @@ msgid ""
"switchable endianness (bi-endian). Use ``sys.byteorder`` to check the " "switchable endianness (bi-endian). Use ``sys.byteorder`` to check the "
"endianness of your system." "endianness of your system."
msgstr "" msgstr ""
"Le boutisme natif est gros-boutiste ou petit-boutiste, en fonction de la "
"machine sur laquelle s'exécute le programme. Par exemple, les Intel x86 et "
"les AMD64 (x86-64) sont petit-boutistes ; les Motorola 68000 et les *PowerPC "
"G5* sont gros-boutistes ; les ARM et les Intel Itanium peuvent changer de "
"boutisme. Utilisez ``sys.byteorder`` pour vérifier le boutisme de votre "
"système."
#: ../Doc/library/struct.rst:153 #: ../Doc/library/struct.rst:153
msgid "" msgid ""
"Native size and alignment are determined using the C compiler's ``sizeof`` " "Native size and alignment are determined using the C compiler's ``sizeof`` "
"expression. This is always combined with native byte order." "expression. This is always combined with native byte order."
msgstr "" msgstr ""
"La taille et l'alignement natifs sont déterminés en utilisant l'expression "
"``sizeof`` du compilateur C. Leur valeur est toujours combinée au boutisme "
"natif."
#: ../Doc/library/struct.rst:156 #: ../Doc/library/struct.rst:156
msgid "" msgid ""
"Standard size depends only on the format character; see the table in the :" "Standard size depends only on the format character; see the table in the :"
"ref:`format-characters` section." "ref:`format-characters` section."
msgstr "" msgstr ""
"La taille standard dépend seulement du caractère du format ; référez-vous au "
"tableau dans la section :ref:`format-characters`."
#: ../Doc/library/struct.rst:159 #: ../Doc/library/struct.rst:159
msgid "" msgid ""
"Note the difference between ``'@'`` and ``'='``: both use native byte order, " "Note the difference between ``'@'`` and ``'='``: both use native byte order, "
"but the size and alignment of the latter is standardized." "but the size and alignment of the latter is standardized."
msgstr "" msgstr ""
"Notez la différence entre ``'@'`` et ``'='`` : les deux utilisent le "
"boutisme natif mais la taille et l'alignement du dernier sont standards."
#: ../Doc/library/struct.rst:162 #: ../Doc/library/struct.rst:162
msgid "" msgid ""
"The form ``'!'`` is available for those poor souls who claim they can't " "The form ``'!'`` is available for those poor souls who claim they can't "
"remember whether network byte order is big-endian or little-endian." "remember whether network byte order is big-endian or little-endian."
msgstr "" msgstr ""
"La forme ``'!'`` existe pour les têtes en l'air qui prétendent ne pas se "
"rappeler si le boutisme réseau est gros-boutiste ou petit-boutiste."
#: ../Doc/library/struct.rst:165 #: ../Doc/library/struct.rst:165
msgid "" msgid ""
"There is no way to indicate non-native byte order (force byte-swapping); use " "There is no way to indicate non-native byte order (force byte-swapping); use "
"the appropriate choice of ``'<'`` or ``'>'``." "the appropriate choice of ``'<'`` or ``'>'``."
msgstr "" msgstr ""
"Il n'y a pas de moyen de spécifier le boutisme contraire au boutisme natif "
"(c'est-à-dire forcer la permutation des octets) ; utilisez le bon caractère "
"entre ``'<'`` et ``'>'``."
#: ../Doc/library/struct.rst:168 ../Doc/library/struct.rst:247 #: ../Doc/library/struct.rst:168 ../Doc/library/struct.rst:247
msgid "Notes:" msgid "Notes:"
@ -263,12 +349,17 @@ msgid ""
"Padding is only automatically added between successive structure members. No " "Padding is only automatically added between successive structure members. No "
"padding is added at the beginning or the end of the encoded struct." "padding is added at the beginning or the end of the encoded struct."
msgstr "" msgstr ""
"Le bourrage (*padding* en anglais) n'est automatiquement ajouté qu'entre les "
"membres successifs de la structure. Il n'y a pas de bourrage au début ou à "
"la fin de la structure agrégée."
#: ../Doc/library/struct.rst:173 #: ../Doc/library/struct.rst:173
msgid "" msgid ""
"No padding is added when using non-native size and alignment, e.g. with '<', " "No padding is added when using non-native size and alignment, e.g. with '<', "
"'>', '=', and '!'." "'>', '=', and '!'."
msgstr "" msgstr ""
"Il n'y a pas d'ajout de bourrage lorsque vous utilisez une taille et un "
"alignement non-natifs, par exemple avec `<`, `'>', `=` ou `!`."
#: ../Doc/library/struct.rst:176 #: ../Doc/library/struct.rst:176
msgid "" msgid ""
@ -276,10 +367,13 @@ msgid ""
"type, end the format with the code for that type with a repeat count of " "type, end the format with the code for that type with a repeat count of "
"zero. See :ref:`struct-examples`." "zero. See :ref:`struct-examples`."
msgstr "" msgstr ""
"Pour aligner la fin d'une structure à l'alignement requis par un type "
"particulier, terminez le format avec le code du type voulu et une valeur de "
"répétition à zéro. Référez-vous à :ref:`struct-examples`."
#: ../Doc/library/struct.rst:184 #: ../Doc/library/struct.rst:184
msgid "Format Characters" msgid "Format Characters"
msgstr "" msgstr "Caractères de format"
#: ../Doc/library/struct.rst:186 #: ../Doc/library/struct.rst:186
msgid "" msgid ""
@ -290,6 +384,13 @@ msgid ""
"``'!'`` or ``'='``. When using native size, the size of the packed value is " "``'!'`` or ``'='``. When using native size, the size of the packed value is "
"platform-dependent." "platform-dependent."
msgstr "" msgstr ""
"Les caractères de format possèdent les significations suivantes ; la "
"conversion entre les valeurs C et Python doit être évidente compte tenu des "
"types concernés. La colonne « taille standard » fait référence à la taille "
"en octets de la valeur agrégée avec l'utilisation de la taille standard "
"(c'est-à-dire lorsque la chaîne de format commence par l'un des caractères "
"suivants : ``'<'``, ``'>'``, ``'!'`` ou ``'='``). Si vous utilisez la taille "
"native, la taille de la valeur agrégée dépend de la plateforme."
#: ../Doc/library/struct.rst:194 #: ../Doc/library/struct.rst:194
msgid "Format" msgid "Format"
@ -305,7 +406,7 @@ msgstr "Type Python"
#: ../Doc/library/struct.rst:194 #: ../Doc/library/struct.rst:194
msgid "Standard size" msgid "Standard size"
msgstr "" msgstr "Taille standard"
#: ../Doc/library/struct.rst:194 #: ../Doc/library/struct.rst:194
msgid "Notes" msgid "Notes"
@ -317,11 +418,11 @@ msgstr "``x``"
#: ../Doc/library/struct.rst:196 #: ../Doc/library/struct.rst:196
msgid "pad byte" msgid "pad byte"
msgstr "" msgstr "octet de bourrage"
#: ../Doc/library/struct.rst:196 #: ../Doc/library/struct.rst:196
msgid "no value" msgid "no value"
msgstr "" msgstr "pas de valeur"
#: ../Doc/library/struct.rst:198 #: ../Doc/library/struct.rst:198
msgid "``c``" msgid "``c``"
@ -333,7 +434,7 @@ msgstr ":c:type:`char`"
#: ../Doc/library/struct.rst:198 #: ../Doc/library/struct.rst:198
msgid "bytes of length 1" msgid "bytes of length 1"
msgstr "" msgstr "*bytes* (suite d'octets) de taille 1"
#: ../Doc/library/struct.rst:198 ../Doc/library/struct.rst:200 #: ../Doc/library/struct.rst:198 ../Doc/library/struct.rst:200
#: ../Doc/library/struct.rst:202 ../Doc/library/struct.rst:204 #: ../Doc/library/struct.rst:202 ../Doc/library/struct.rst:204
@ -356,12 +457,11 @@ msgstr ":c:type:`signed char`"
#: ../Doc/library/struct.rst:223 ../Doc/library/struct.rst:225 #: ../Doc/library/struct.rst:223 ../Doc/library/struct.rst:225
#: ../Doc/library/struct.rst:237 #: ../Doc/library/struct.rst:237
msgid "integer" msgid "integer"
msgstr "" msgstr "*int* (entier)"
#: ../Doc/library/struct.rst:200 #: ../Doc/library/struct.rst:200
#, fuzzy
msgid "\\(1), \\(2)" msgid "\\(1), \\(2)"
msgstr "\\(1),\\(3)" msgstr "\\(1), \\(2)"
#: ../Doc/library/struct.rst:202 #: ../Doc/library/struct.rst:202
msgid "``B``" msgid "``B``"
@ -389,7 +489,7 @@ msgstr ":c:type:`_Bool`"
#: ../Doc/library/struct.rst:204 #: ../Doc/library/struct.rst:204
msgid "bool" msgid "bool"
msgstr "bool" msgstr "*bool* (booléen)"
#: ../Doc/library/struct.rst:204 #: ../Doc/library/struct.rst:204
msgid "\\(1)" msgid "\\(1)"
@ -497,7 +597,7 @@ msgstr ":c:type:`size_t`"
#: ../Doc/library/struct.rst:227 #: ../Doc/library/struct.rst:227
msgid "``e``" msgid "``e``"
msgstr "" msgstr "``e``"
#: ../Doc/library/struct.rst:227 #: ../Doc/library/struct.rst:227
msgid "\\(6)" msgid "\\(6)"
@ -506,7 +606,7 @@ msgstr "\\(6)"
#: ../Doc/library/struct.rst:227 ../Doc/library/struct.rst:229 #: ../Doc/library/struct.rst:227 ../Doc/library/struct.rst:229
#: ../Doc/library/struct.rst:231 #: ../Doc/library/struct.rst:231
msgid "float" msgid "float"
msgstr "*float*" msgstr "*float* (nombre à virgule flottante)"
#: ../Doc/library/struct.rst:227 ../Doc/library/struct.rst:229 #: ../Doc/library/struct.rst:227 ../Doc/library/struct.rst:229
#: ../Doc/library/struct.rst:231 #: ../Doc/library/struct.rst:231
@ -539,7 +639,7 @@ msgstr ":c:type:`char[]`"
#: ../Doc/library/struct.rst:233 ../Doc/library/struct.rst:235 #: ../Doc/library/struct.rst:233 ../Doc/library/struct.rst:235
msgid "bytes" msgid "bytes"
msgstr "bytes" msgstr "*bytes* (séquence d'octets)"
#: ../Doc/library/struct.rst:235 #: ../Doc/library/struct.rst:235
msgid "``p``" msgid "``p``"
@ -557,13 +657,15 @@ msgstr ":c:type:`void \\*`"
msgid "\\(5)" msgid "\\(5)"
msgstr "\\(5)" msgstr "\\(5)"
# Suit un ':' dans la version affichée, donc pas de majuscule.
#: ../Doc/library/struct.rst:240 #: ../Doc/library/struct.rst:240
msgid "Added support for the ``'n'`` and ``'N'`` formats." msgid "Added support for the ``'n'`` and ``'N'`` formats."
msgstr "" msgstr "ajouté la gestion des formats ``'n'`` et ``'N'``."
# Suit un ':' dans la version affichée, donc pas de majuscule.
#: ../Doc/library/struct.rst:243 #: ../Doc/library/struct.rst:243
msgid "Added support for the ``'e'`` format." msgid "Added support for the ``'e'`` format."
msgstr "" msgstr "ajouté la gestion du format ``'e'``."
#: ../Doc/library/struct.rst:252 #: ../Doc/library/struct.rst:252
msgid "" msgid ""
@ -571,6 +673,9 @@ msgid ""
"by C99. If this type is not available, it is simulated using a :c:type:" "by C99. If this type is not available, it is simulated using a :c:type:"
"`char`. In standard mode, it is always represented by one byte." "`char`. In standard mode, it is always represented by one byte."
msgstr "" msgstr ""
"Le code de conversion ``'?'`` correspond au type :c:type:`_Bool` de C99. Si "
"ce type n'est pas disponible, il est simulé en utilisant un :c:type:`char`. "
"Dans le mode standard, il est toujours représenté par un octet."
#: ../Doc/library/struct.rst:257 #: ../Doc/library/struct.rst:257
msgid "" msgid ""
@ -578,10 +683,15 @@ msgid ""
"codes, if the non-integer has a :meth:`__index__` method then that method is " "codes, if the non-integer has a :meth:`__index__` method then that method is "
"called to convert the argument to an integer before packing." "called to convert the argument to an integer before packing."
msgstr "" msgstr ""
"Lorsque vous essayez d'agréger un non-entier en utilisant un code de "
"conversion pour un entier, si ce non-entier possède une méthode :meth:"
"`__index__` alors cette méthode est appelée pour convertir l'argument en "
"entier avant l'agrégation."
# Suit un ':' dans la version affichée, donc pas de majuscule.
#: ../Doc/library/struct.rst:261 #: ../Doc/library/struct.rst:261
msgid "Use of the :meth:`__index__` method for non-integers is new in 3.2." msgid "Use of the :meth:`__index__` method for non-integers is new in 3.2."
msgstr "" msgstr "utilisation de la méthode :meth:`__index__` pour les non-entiers. "
#: ../Doc/library/struct.rst:265 #: ../Doc/library/struct.rst:265
msgid "" msgid ""
@ -590,6 +700,10 @@ msgid ""
"the standard size, you can use whichever of the other integer formats fits " "the standard size, you can use whichever of the other integer formats fits "
"your application." "your application."
msgstr "" msgstr ""
"Les codes de conversion ``'n'`` et ``'N'`` ne sont disponibles que pour la "
"taille native (choisie par défaut ou à l'aide du caractère de boutisme "
"``'@'``). Pour la taille standard, vous pouvez utiliser n'importe quel "
"format d'entier qui convient à votre application."
#: ../Doc/library/struct.rst:271 #: ../Doc/library/struct.rst:271
msgid "" msgid ""
@ -598,6 +712,10 @@ msgid ""
"``'f'``, ``'d'`` or ``'e'`` respectively), regardless of the floating-point " "``'f'``, ``'d'`` or ``'e'`` respectively), regardless of the floating-point "
"format used by the platform." "format used by the platform."
msgstr "" msgstr ""
"Pour les codes de conversion ``'f'``, ``'d'`` et ``'e'``, la représentation "
"agrégée utilise respectivement le format IEEE 754 *binaire32*, *binaire64* "
"ou *binaire16* (pour ``'f'``, ``'d'`` ou ``'e'`` respectivement), quel que "
"soit le format des nombres à virgule flottante de la plateforme."
#: ../Doc/library/struct.rst:277 #: ../Doc/library/struct.rst:277
msgid "" msgid ""
@ -607,6 +725,11 @@ msgid ""
"on the host system. The struct module does not interpret this as native " "on the host system. The struct module does not interpret this as native "
"ordering, so the ``'P'`` format is not available." "ordering, so the ``'P'`` format is not available."
msgstr "" msgstr ""
"Le caractère de format ``'P'`` n'est disponible que pour le boutisme natif "
"(choisi par défaut ou à l'aide du caractère ``'@'`` de boutisme). Le "
"caractère de boutisme ``'='`` choisit d'utiliser un petit ou un gros en "
"fonction du système hôte. Le module *struct* ne l'interprète pas comme un "
"boutisme natif, donc le format ``'P'`` n'est pas disponible."
#: ../Doc/library/struct.rst:284 #: ../Doc/library/struct.rst:284
msgid "" msgid ""
@ -619,18 +742,34 @@ msgid ""
"operations. See the Wikipedia page on the `half-precision floating-point " "operations. See the Wikipedia page on the `half-precision floating-point "
"format <half precision format_>`_ for more information." "format <half precision format_>`_ for more information."
msgstr "" msgstr ""
"Le type IEEE 754 *binaire16* « demie-précision » a été introduit en 2008 par "
"la révision du `standard IEEE 754 <ieee 754 standard_>`_. Il comprend un bit "
"de signe, un exposant sur 5 bits et une précision de 11 bits (dont 10 bits "
"sont explicitement stockés) ; il peut représenter les nombres entre environ "
"``6.1e-05`` et ``6.5e+04`` avec une précision maximale. Ce type est rarement "
"pris en charge par les compilateurs C : sur une machine courante, un "
"*unsigned short* (entier court non signé) peut être utilisé pour le stockage "
"mais pas pour les opérations mathématiques. Lisez la page Wikipédia (NdT : "
"non traduite en français) `half-precision floating-point format <half "
"precision format_>`_ pour davantage d'informations."
#: ../Doc/library/struct.rst:294 #: ../Doc/library/struct.rst:294
msgid "" msgid ""
"A format character may be preceded by an integral repeat count. For " "A format character may be preceded by an integral repeat count. For "
"example, the format string ``'4h'`` means exactly the same as ``'hhhh'``." "example, the format string ``'4h'`` means exactly the same as ``'hhhh'``."
msgstr "" msgstr ""
"Un caractère de format peut être précédé par un entier indiquant le nombre "
"de répétitions. Par exemple, la chaîne de format ``'4h'`` a exactement la "
"même signification que ``'hhhh'``."
#: ../Doc/library/struct.rst:297 #: ../Doc/library/struct.rst:297
msgid "" msgid ""
"Whitespace characters between formats are ignored; a count and its format " "Whitespace characters between formats are ignored; a count and its format "
"must not contain whitespace though." "must not contain whitespace though."
msgstr "" msgstr ""
"Les caractères d'espacement entre les indications de format sont ignorés ; "
"cependant, le nombre de répétitions et le format associé ne doivent pas être "
"séparés par des caractères d'espacement."
#: ../Doc/library/struct.rst:300 #: ../Doc/library/struct.rst:300
msgid "" msgid ""
@ -643,6 +782,15 @@ msgid ""
"number of bytes. As a special case, ``'0s'`` means a single, empty string " "number of bytes. As a special case, ``'0s'`` means a single, empty string "
"(while ``'0c'`` means 0 characters)." "(while ``'0c'`` means 0 characters)."
msgstr "" msgstr ""
"Pour le caractère de format ``'s'``, un nombre en tête est interprété comme "
"la longueur du *bytes* et non comme le nombre de répétitions comme pour les "
"autres caractères de format ; par exemple, ``'10s'`` signifie une seule "
"chaîne de 10 octets alors que ``'10c'`` signifie 10 caractères. Si aucun "
"nombre n'est indiqué, la valeur par défaut est 1. Pour l'agrégation, la "
"chaîne est tronquée ou bourrée avec des octets nuls pour atteindre la taille "
"souhaitée. Pour la dissociation, l'objet *bytes* résultant possède le nombre "
"exact d'octets spécifiés. Un cas particulier est ``'0s'`` qui signifie une "
"chaîne (et une seule) vide (alors que ``'0c'`` signifie zéro caractère)."
#: ../Doc/library/struct.rst:309 #: ../Doc/library/struct.rst:309
msgid "" msgid ""
@ -651,12 +799,20 @@ msgid ""
"``'Q'``), if ``x`` is outside the valid range for that format then :exc:" "``'Q'``), if ``x`` is outside the valid range for that format then :exc:"
"`struct.error` is raised." "`struct.error` is raised."
msgstr "" msgstr ""
"Lors de l'agrégation d'une valeur ``x`` en utilisant l'un des formats pour "
"les entiers (``'b'``, ``'B'``, ``'h'``, ``'H'``, ``'i'``, ``'I'``, ``'l'``, "
"``'L'``, ``'q'``, ``'Q'``), si ``x`` est en dehors de l'intervalle du format "
"spécifié, une :exc:`struct.error` est levée."
# Pas de majuscule en début car cela suit un ':' dans la version affichée.
#: ../Doc/library/struct.rst:314 #: ../Doc/library/struct.rst:314
msgid "" msgid ""
"In 3.0, some of the integer formats wrapped out-of-range values and raised :" "In 3.0, some of the integer formats wrapped out-of-range values and raised :"
"exc:`DeprecationWarning` instead of :exc:`struct.error`." "exc:`DeprecationWarning` instead of :exc:`struct.error`."
msgstr "" msgstr ""
"auparavant, certains formats d'entiers absorbaient les valeurs en dehors des "
"intervalles valides et levaient une :exc:`DeprecationWarning` au lieu d'une :"
"exc:`struct.error`."
#: ../Doc/library/struct.rst:318 #: ../Doc/library/struct.rst:318
msgid "" msgid ""
@ -671,6 +827,17 @@ msgid ""
"consumes ``count`` bytes, but that the string returned can never contain " "consumes ``count`` bytes, but that the string returned can never contain "
"more than 255 bytes." "more than 255 bytes."
msgstr "" msgstr ""
"Le caractère de format ``'p'`` sert à encoder une « chaîne Pascal », c'est-à-"
"dire une courte chaîne de longueur variable, stockée dans un *nombre défini "
"d'octets* dont la valeur est définie par la répétition. Le premier octet "
"stocké est la longueur de la chaîne (dans la limite maximum de 255). Les "
"octets composant la chaîne suivent. Si la chaîne passée à :func:`pack` est "
"trop longue (supérieure à la valeur de la répétition moins 1), seuls les "
"``count-1`` premiers octets de la chaîne sont stockés. Si la chaîne est plus "
"courte que ``count-1``, des octets de bourrage nuls sont insérés de manière "
"à avoir exactement *count* octets au final. Notez que pour :func:`unpack`, "
"le caractère de format ``'p'`` consomme ``count`` octets mais que la chaîne "
"renvoyée ne peut pas excéder 255 octets."
#: ../Doc/library/struct.rst:331 #: ../Doc/library/struct.rst:331
msgid "" msgid ""
@ -679,52 +846,69 @@ msgid ""
"used. Either 0 or 1 in the native or standard bool representation will be " "used. Either 0 or 1 in the native or standard bool representation will be "
"packed, and any non-zero value will be ``True`` when unpacking." "packed, and any non-zero value will be ``True`` when unpacking."
msgstr "" msgstr ""
"Pour le caractère de format ``'?'``, la valeur renvoyée est :const:`True` "
"ou :const:`False`. Lors de l'agrégation, la valeur de vérité de l'objet "
"argument est utilisée. La valeur agrégée est 0 ou 1 dans la représentation "
"native ou standard et, lors de la dissociation, n'importe quelle valeur "
"différente de zéro est renvoyée ``True``."
#: ../Doc/library/struct.rst:341 #: ../Doc/library/struct.rst:341
msgid "Examples" msgid "Examples"
msgstr "Exemples" msgstr "Exemples"
# Pas de majuscule en début car cela suit un ':' dans la version affichée.
#: ../Doc/library/struct.rst:344 #: ../Doc/library/struct.rst:344
msgid "" msgid ""
"All examples assume a native byte order, size, and alignment with a big-" "All examples assume a native byte order, size, and alignment with a big-"
"endian machine." "endian machine."
msgstr "" msgstr ""
"tous les exemples présentés supposent que l'on utilise le boutisme, la "
"taille et l'alignement natifs sur une machine gros-boutiste."
#: ../Doc/library/struct.rst:347 #: ../Doc/library/struct.rst:347
msgid "A basic example of packing/unpacking three integers::" msgid "A basic example of packing/unpacking three integers::"
msgstr "" msgstr "Un exemple de base d'agrégation et dissociation de trois entiers ::"
#: ../Doc/library/struct.rst:357 #: ../Doc/library/struct.rst:357
msgid "" msgid ""
"Unpacked fields can be named by assigning them to variables or by wrapping " "Unpacked fields can be named by assigning them to variables or by wrapping "
"the result in a named tuple::" "the result in a named tuple::"
msgstr "" msgstr ""
"Les champs dissociés peuvent être nommés en leur assignant des variables ou "
"en encapsulant le résultat dans un n-uplet nommé ::"
#: ../Doc/library/struct.rst:368 #: ../Doc/library/struct.rst:368
msgid "" msgid ""
"The ordering of format characters may have an impact on size since the " "The ordering of format characters may have an impact on size since the "
"padding needed to satisfy alignment requirements is different::" "padding needed to satisfy alignment requirements is different::"
msgstr "" msgstr ""
"L'ordre des caractères de format peut avoir un impact sur la taille puisque "
"le bourrage nécessaire pour réaliser l'alignement est différent ::"
#: ../Doc/library/struct.rst:380 #: ../Doc/library/struct.rst:380
msgid "" msgid ""
"The following format ``'llh0l'`` specifies two pad bytes at the end, " "The following format ``'llh0l'`` specifies two pad bytes at the end, "
"assuming longs are aligned on 4-byte boundaries::" "assuming longs are aligned on 4-byte boundaries::"
msgstr "" msgstr ""
"Le format suivant ``'llh0l'`` spécifie deux octets de bourrage à la fin, "
"considérant que les entiers longs sont alignés sur des espacements de 4 "
"octets ::"
#: ../Doc/library/struct.rst:386 #: ../Doc/library/struct.rst:386
msgid "" msgid ""
"This only works when native size and alignment are in effect; standard size " "This only works when native size and alignment are in effect; standard size "
"and alignment does not enforce any alignment." "and alignment does not enforce any alignment."
msgstr "" msgstr ""
"Ceci ne fonctionne que quand la taille et l'alignement natifs sont "
"utilisés ; la taille et l'alignement standards ne forcent aucun alignement."
#: ../Doc/library/struct.rst:393 #: ../Doc/library/struct.rst:393
msgid "Module :mod:`array`" msgid "Module :mod:`array`"
msgstr "" msgstr "Module :mod:`array`"
#: ../Doc/library/struct.rst:393 #: ../Doc/library/struct.rst:393
msgid "Packed binary storage of homogeneous data." msgid "Packed binary storage of homogeneous data."
msgstr "" msgstr "Stockage agrégé binaire de données homogènes."
#: ../Doc/library/struct.rst:395 #: ../Doc/library/struct.rst:395
msgid "Module :mod:`xdrlib`" msgid "Module :mod:`xdrlib`"
@ -732,7 +916,7 @@ msgstr "Module :mod:`xdrlib`"
#: ../Doc/library/struct.rst:396 #: ../Doc/library/struct.rst:396
msgid "Packing and unpacking of XDR data." msgid "Packing and unpacking of XDR data."
msgstr "" msgstr "Agrégation et dissociation de données XDR."
#: ../Doc/library/struct.rst:402 #: ../Doc/library/struct.rst:402
msgid "Classes" msgid "Classes"
@ -740,7 +924,7 @@ msgstr "Classes"
#: ../Doc/library/struct.rst:404 #: ../Doc/library/struct.rst:404
msgid "The :mod:`struct` module also defines the following type:" msgid "The :mod:`struct` module also defines the following type:"
msgstr "" msgstr "Le module :mod:`struct` définit aussi le type suivant :"
#: ../Doc/library/struct.rst:409 #: ../Doc/library/struct.rst:409
msgid "" msgid ""
@ -749,7 +933,13 @@ msgid ""
"methods is more efficient than calling the :mod:`struct` functions with the " "methods is more efficient than calling the :mod:`struct` functions with the "
"same format since the format string only needs to be compiled once." "same format since the format string only needs to be compiled once."
msgstr "" msgstr ""
"Renvoie un nouvel objet Struct qui écrit et lit des données binaires "
"conformément à la chaîne de format *format*. Créer une fois pour toutes un "
"objet Struct puis appeler ses méthodes est plus efficace que d'appeler les "
"fonctions de :mod:`struct` avec le même format puisque la chaîne de format "
"n'est compilée qu'une seule fois."
# Pas de majuscule en début car suit un ':' dans la version affichée.
#: ../Doc/library/struct.rst:416 #: ../Doc/library/struct.rst:416
msgid "" msgid ""
"The compiled versions of the most recent format strings passed to :class:" "The compiled versions of the most recent format strings passed to :class:"
@ -757,26 +947,36 @@ msgid ""
"only a few format strings needn't worry about reusing a single :class:" "only a few format strings needn't worry about reusing a single :class:"
"`Struct` instance." "`Struct` instance."
msgstr "" msgstr ""
"les versions compilées des dernières chaînes de format passées à :class:"
"`Struct` et aux fonctions de niveau module sont mises en cache, de manière à "
"ce que les programmes qui n'utilisent que quelques chaînes de format n'aient "
"pas à se préoccuper de n'utiliser qu'une seule instance de :class:`Struct`."
#: ../Doc/library/struct.rst:421 #: ../Doc/library/struct.rst:421
msgid "Compiled Struct objects support the following methods and attributes:" msgid "Compiled Struct objects support the following methods and attributes:"
msgstr "" msgstr ""
"Les objets ``Struct`` compilés gèrent les méthodes et attributs suivants :"
#: ../Doc/library/struct.rst:425 #: ../Doc/library/struct.rst:425
msgid "" msgid ""
"Identical to the :func:`pack` function, using the compiled format. " "Identical to the :func:`pack` function, using the compiled format. "
"(``len(result)`` will equal :attr:`size`.)" "(``len(result)`` will equal :attr:`size`.)"
msgstr "" msgstr ""
"Identique à la fonction :func:`pack`, en utilisant le format compilé "
"(``len(result)`` vaut :attr:`size`)."
#: ../Doc/library/struct.rst:431 #: ../Doc/library/struct.rst:431
msgid "Identical to the :func:`pack_into` function, using the compiled format." msgid "Identical to the :func:`pack_into` function, using the compiled format."
msgstr "" msgstr ""
"Identique à la fonction :func:`pack_into`, en utilisant le format compilé."
#: ../Doc/library/struct.rst:436 #: ../Doc/library/struct.rst:436
msgid "" msgid ""
"Identical to the :func:`unpack` function, using the compiled format. The " "Identical to the :func:`unpack` function, using the compiled format. The "
"buffer's size in bytes must equal :attr:`size`." "buffer's size in bytes must equal :attr:`size`."
msgstr "" msgstr ""
"Identique à la fonction :func:`unpack`, en utilisant le format compilé. La "
"taille du tampon *buffer* en octets doit valoir :attr:`size`."
#: ../Doc/library/struct.rst:442 #: ../Doc/library/struct.rst:442
msgid "" msgid ""
@ -784,26 +984,36 @@ msgid ""
"The buffer's size in bytes, starting at position *offset*, must be at least :" "The buffer's size in bytes, starting at position *offset*, must be at least :"
"attr:`size`." "attr:`size`."
msgstr "" msgstr ""
"Identique à la fonction :func:`unpack_from`, en utilisant le format compilé. "
"La taille du tampon *buffer* en octets, en commençant à la position "
"*offset*, doit valoir au moins :attr:`size`."
#: ../Doc/library/struct.rst:449 #: ../Doc/library/struct.rst:449
msgid "" msgid ""
"Identical to the :func:`iter_unpack` function, using the compiled format. " "Identical to the :func:`iter_unpack` function, using the compiled format. "
"The buffer's size in bytes must be a multiple of :attr:`size`." "The buffer's size in bytes must be a multiple of :attr:`size`."
msgstr "" msgstr ""
"Identique à la fonction :func:`iter_unpack`, en utilisant le format compilé. "
"La taille du tampon *buffer* en octets doit être un multiple de :attr:`size`."
#: ../Doc/library/struct.rst:456 #: ../Doc/library/struct.rst:456
msgid "The format string used to construct this Struct object." msgid "The format string used to construct this Struct object."
msgstr "" msgstr "La chaîne de format utilisée pour construire l'objet `Struct`."
# Pas de majuscule car suit un ':' dans la version affichée.
#: ../Doc/library/struct.rst:458 #: ../Doc/library/struct.rst:458
msgid "The format string type is now :class:`str` instead of :class:`bytes`." msgid "The format string type is now :class:`str` instead of :class:`bytes`."
msgstr "" msgstr ""
"la chaîne de format est maintenant de type :class:`str` au lieu de :class:"
"`bytes`."
#: ../Doc/library/struct.rst:463 #: ../Doc/library/struct.rst:463
msgid "" msgid ""
"The calculated size of the struct (and hence of the bytes object produced by " "The calculated size of the struct (and hence of the bytes object produced by "
"the :meth:`pack` method) corresponding to :attr:`format`." "the :meth:`pack` method) corresponding to :attr:`format`."
msgstr "" msgstr ""
"La taille calculée de la structure agrégée (et donc de l'objet `bytes` "
"produit par la méthode :meth:`pack`) correspondante à :attr:`format`."
#~ msgid "\\(2), \\(3)" #~ msgid "\\(2), \\(3)"
#~ msgstr "\\(2), \\(3)" #~ msgstr "\\(2), \\(3)"