1
0
Fork 0
python-docs-fr/library/struct.po

1204 lines
44 KiB
Plaintext
Raw Normal View History

2018-07-04 09:06:45 +00:00
# Copyright (C) 2001-2018, Python Software Foundation
2018-07-04 09:08:42 +00:00
# For licence information, see README file.
2016-10-30 09:46:26 +00:00
#
msgid ""
msgstr ""
2019-12-05 22:15:54 +00:00
"Project-Id-Version: Python 3\n"
2016-10-30 09:46:26 +00:00
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-01-15 22:33+0100\n"
2022-11-14 15:08:57 +00:00
"PO-Revision-Date: 2022-10-18 15:59+0200\n"
2017-08-11 17:15:07 +00:00
"Last-Translator: Julien Palard <julien@palard.fr>\n"
2018-07-04 09:14:25 +00:00
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
2017-05-23 22:40:56 +00:00
"Language: fr\n"
2016-10-30 09:46:26 +00:00
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
2020-01-24 08:39:00 +00:00
"X-Generator: Poedit 2.2.3\n"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:2
2016-10-30 09:46:26 +00:00
msgid ":mod:`struct` --- Interpret bytes as packed binary data"
msgstr ""
2020-01-24 08:39:00 +00:00
":mod:`struct` — manipulation de données agrégées sous forme binaire comme "
"une séquence d'octets"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:7
2016-10-30 09:46:26 +00:00
msgid "**Source code:** :source:`Lib/struct.py`"
2020-01-24 08:39:00 +00:00
msgstr "**Code source :** :source:`Lib/struct.py`"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:15
2016-10-30 09:46:26 +00:00
msgid ""
"This module converts between Python values and C structs represented as "
"Python :class:`bytes` objects. Compact :ref:`format strings <struct-format-"
"strings>` describe the intended conversions to/from Python values. The "
"module's functions and objects can be used for two largely distinct "
"applications, data exchange with external sources (files or network "
"connections), or data transfer between the Python application and the C "
"layer."
msgstr ""
2016-10-30 09:46:26 +00:00
#: library/struct.rst:25
msgid ""
"When no prefix character is given, native mode is the default. It packs or "
"unpacks data based on the platform and compiler on which the Python "
"interpreter was built. The result of packing a given C struct includes pad "
"bytes which maintain proper alignment for the C types involved; similarly, "
"alignment is taken into account when unpacking. In contrast, when "
"communicating data between external sources, the programmer is responsible "
"for defining byte ordering and padding between elements. See :ref:`struct-"
"alignment` for details."
msgstr ""
#: library/struct.rst:35
2016-10-30 09:46:26 +00:00
msgid ""
"Several :mod:`struct` functions (and methods of :class:`Struct`) take a "
"*buffer* argument. This refers to objects that implement the :ref:"
"`bufferobjects` and provide either a readable or read-writable buffer. The "
"most common types used for that purpose are :class:`bytes` and :class:"
"`bytearray`, but many other types that can be viewed as an array of bytes "
"implement the buffer protocol, so that they can be read/filled without "
"additional copying from a :class:`bytes` object."
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:44
2016-10-30 09:46:26 +00:00
msgid "Functions and Exceptions"
2020-01-24 08:39:00 +00:00
msgstr "Fonctions et exceptions"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:46
2016-10-30 09:46:26 +00:00
msgid "The module defines the following exception and functions:"
2020-01-24 08:39:00 +00:00
msgstr "Le module définit les exceptions et fonctions suivantes :"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:51
2016-10-30 09:46:26 +00:00
msgid ""
"Exception raised on various occasions; argument is a string describing what "
"is wrong."
msgstr ""
2020-01-24 08:39:00 +00:00
"Exception levée à plusieurs occasions ; l'argument est une chaîne qui décrit "
"ce qui ne va pas."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:57
2016-10-30 09:46:26 +00:00
msgid ""
"Return a bytes object containing the values *v1*, *v2*, ... packed according "
2018-06-28 13:32:56 +00:00
"to the format string *format*. The arguments must match the values required "
"by the format exactly."
2016-10-30 09:46:26 +00:00
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:64
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"Pack the values *v1*, *v2*, ... according to the format string *format* and "
2016-10-30 09:46:26 +00:00
"write the packed bytes into the writable buffer *buffer* starting at "
"position *offset*. Note that *offset* is a required argument."
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:71
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"Unpack from the buffer *buffer* (presumably packed by ``pack(format, ...)``) "
"according to the format string *format*. The result is a tuple even if it "
2016-10-30 09:46:26 +00:00
"contains exactly one item. The buffer's size in bytes must match the size "
"required by the format, as reflected by :func:`calcsize`."
msgstr ""
2020-01-24 08:39:00 +00:00
"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 "
2020-01-24 08:39:00 +00:00
"élément. La taille de *buffer* en octets doit correspondre à la taille "
"requise par le format, telle que calculée par :func:`calcsize`."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:79
2016-10-30 09:46:26 +00:00
msgid ""
"Unpack from *buffer* starting at position *offset*, according to the format "
2018-06-28 13:32:56 +00:00
"string *format*. The result is a tuple even if it contains exactly one "
2019-09-04 09:35:23 +00:00
"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`."
2016-10-30 09:46:26 +00:00
msgstr ""
2020-01-24 08:39:00 +00:00
"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`."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:87
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"Iteratively unpack from the buffer *buffer* according to the format string "
"*format*. This function returns an iterator which will read equally sized "
2016-10-30 09:46:26 +00:00
"chunks from the buffer until all its contents have been consumed. The "
"buffer's size in bytes must be a multiple of the size required by the "
"format, as reflected by :func:`calcsize`."
msgstr ""
2020-01-24 08:39:00 +00:00
"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`."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:93
2016-10-30 09:46:26 +00:00
msgid "Each iteration yields a tuple as specified by the format string."
msgstr ""
"Chaque itération produit un *n*-uplet tel que spécifié par la chaîne de "
"format."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:100
2016-10-30 09:46:26 +00:00
msgid ""
"Return the size of the struct (and hence of the bytes object produced by "
2018-06-28 13:32:56 +00:00
"``pack(format, ...)``) corresponding to the format string *format*."
2016-10-30 09:46:26 +00:00
msgstr ""
2020-01-24 08:39:00 +00:00
"Renvoie la taille de la structure (et donc celle de l'objet *bytes* produit "
"par ``pack(format, ...)``) correspondant à la chaîne de format *format*."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:107
2016-10-30 09:46:26 +00:00
msgid "Format Strings"
2020-01-24 08:39:00 +00:00
msgstr "Chaînes de spécification du format"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:109
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"Format strings describe the data layout when packing and unpacking data. "
"They are built up from :ref:`format characters<format-characters>`, which "
"specify the type of data being packed/unpacked. In addition, special "
"characters control the :ref:`byte order, size and alignment<struct-"
"alignment>`. Each format string consists of an optional prefix character "
"which describes the overall properties of the data and one or more format "
"characters which describe the actual data values and padding."
2016-10-30 09:46:26 +00:00
msgstr ""
2020-01-24 08:39:00 +00:00
"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>`."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:121
2016-10-30 09:46:26 +00:00
msgid "Byte Order, Size, and Alignment"
2020-01-24 08:39:00 +00:00
msgstr "Boutisme, taille et alignement"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:123
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"By default, C types are represented in the machine's native format and byte "
"order, and properly aligned by skipping pad bytes if necessary (according to "
"the rules used by the C compiler). This behavior is chosen so that the bytes "
"of a packed struct correspond exactly to the memory layout of the "
"corresponding C struct. Whether to use native byte ordering and padding or "
"standard formats depends on the application."
2016-10-30 09:46:26 +00:00
msgstr ""
2020-01-24 08:39:00 +00:00
"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)."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:139
2016-10-30 09:46:26 +00:00
msgid ""
"Alternatively, the first character of the format string can be used to "
"indicate the byte order, size and alignment of the packed data, according to "
"the following table:"
msgstr ""
2020-01-24 08:39:00 +00:00
"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 :"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:144
2016-10-30 09:46:26 +00:00
msgid "Character"
msgstr "Caractère"
#: library/struct.rst:144
2016-10-30 09:46:26 +00:00
msgid "Byte order"
2020-01-24 08:39:00 +00:00
msgstr "Boutisme"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:144
2016-10-30 09:46:26 +00:00
msgid "Size"
2020-01-24 08:39:00 +00:00
msgstr "Taille"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:144
2016-10-30 09:46:26 +00:00
msgid "Alignment"
2020-01-24 08:39:00 +00:00
msgstr "Alignement"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:146
2016-10-30 09:46:26 +00:00
msgid "``@``"
msgstr "``@``"
#: library/struct.rst:148
2016-10-30 09:46:26 +00:00
msgid "native"
2020-01-24 08:39:00 +00:00
msgstr "natif"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:148
2016-10-30 09:46:26 +00:00
msgid "``=``"
msgstr "``=``"
#: library/struct.rst:150 library/struct.rst:154
2016-10-30 09:46:26 +00:00
msgid "standard"
2020-01-24 08:39:00 +00:00
msgstr "standard"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:150 library/struct.rst:154
2016-10-30 09:46:26 +00:00
msgid "none"
2020-01-24 08:39:00 +00:00
msgstr "aucun"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:150
2016-10-30 09:46:26 +00:00
msgid "``<``"
msgstr "``<``"
#: library/struct.rst:150
2016-10-30 09:46:26 +00:00
msgid "little-endian"
2020-01-24 08:39:00 +00:00
msgstr "petit-boutiste"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:152
2016-10-30 09:46:26 +00:00
msgid "``>``"
msgstr "``>``"
#: library/struct.rst:152
2016-10-30 09:46:26 +00:00
msgid "big-endian"
2020-01-24 08:39:00 +00:00
msgstr "gros-boutiste"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:154
2016-10-30 09:46:26 +00:00
msgid "``!``"
msgstr "``!``"
#: library/struct.rst:154
2016-10-30 09:46:26 +00:00
msgid "network (= big-endian)"
2020-01-24 08:39:00 +00:00
msgstr "réseau (= gros-boutiste)"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:157
2016-10-30 09:46:26 +00:00
msgid "If the first character is not one of these, ``'@'`` is assumed."
msgstr ""
2020-01-24 08:39:00 +00:00
"Si le premier caractère n'est pas dans cette liste, le module se comporte "
"comme si ``'@'`` avait été indiqué."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:159
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"Native byte order is big-endian or little-endian, depending on the host "
"system. For example, Intel x86, AMD64 (x86-64), and Apple M1 are little-"
"endian; IBM z and many legacy architectures are big-endian. Use :data:`sys."
"byteorder` to check the endianness of your system."
2016-10-30 09:46:26 +00:00
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:164
2016-10-30 09:46:26 +00:00
msgid ""
"Native size and alignment are determined using the C compiler's ``sizeof`` "
"expression. This is always combined with native byte order."
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:167
2016-10-30 09:46:26 +00:00
msgid ""
"Standard size depends only on the format character; see the table in the :"
"ref:`format-characters` section."
msgstr ""
2020-01-24 08:39:00 +00:00
"La taille standard dépend seulement du caractère du format ; référez-vous au "
"tableau dans la section :ref:`format-characters`."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:170
2016-10-30 09:46:26 +00:00
msgid ""
"Note the difference between ``'@'`` and ``'='``: both use native byte order, "
"but the size and alignment of the latter is standardized."
msgstr ""
2020-01-24 08:39:00 +00:00
"Notez la différence entre ``'@'`` et ``'='`` : les deux utilisent le "
"boutisme natif mais la taille et l'alignement du dernier sont standards."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:173
2016-10-30 09:46:26 +00:00
msgid ""
2020-10-02 08:55:01 +00:00
"The form ``'!'`` represents the network byte order which is always big-"
"endian as defined in `IETF RFC 1700 <IETF RFC 1700_>`_."
2016-10-30 09:46:26 +00:00
msgstr ""
#: library/struct.rst:176
2016-10-30 09:46:26 +00:00
msgid ""
"There is no way to indicate non-native byte order (force byte-swapping); use "
"the appropriate choice of ``'<'`` or ``'>'``."
msgstr ""
2020-01-24 08:39:00 +00:00
"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 ``'>'``."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:258
2016-10-30 09:46:26 +00:00
msgid "Notes:"
msgstr "Notes :"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:181
2016-10-30 09:46:26 +00:00
msgid ""
"Padding is only automatically added between successive structure members. No "
"padding is added at the beginning or the end of the encoded struct."
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:184
2016-10-30 09:46:26 +00:00
msgid ""
"No padding is added when using non-native size and alignment, e.g. with '<', "
"'>', '=', and '!'."
msgstr ""
2020-01-24 08:39:00 +00:00
"Il n'y a pas d'ajout de bourrage lorsque vous utilisez une taille et un "
2022-11-14 15:08:57 +00:00
"alignement non-natifs, par exemple avec ``'<'``, ``'>'``, ``'='`` ou ``'!'``."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:187
2016-10-30 09:46:26 +00:00
msgid ""
"To align the end of a structure to the alignment requirement of a particular "
"type, end the format with the code for that type with a repeat count of "
"zero. See :ref:`struct-examples`."
msgstr ""
2020-01-24 08:39:00 +00:00
"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`."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:195
2016-10-30 09:46:26 +00:00
msgid "Format Characters"
2020-01-24 08:39:00 +00:00
msgstr "Caractères de format"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:197
2016-10-30 09:46:26 +00:00
msgid ""
"Format characters have the following meaning; the conversion between C and "
"Python values should be obvious given their types. The 'Standard size' "
"column refers to the size of the packed value in bytes when using standard "
"size; that is, when the format string starts with one of ``'<'``, ``'>'``, "
"``'!'`` or ``'='``. When using native size, the size of the packed value is "
"platform-dependent."
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:205
2016-10-30 09:46:26 +00:00
msgid "Format"
msgstr "Format"
#: library/struct.rst:205
2016-10-30 09:46:26 +00:00
msgid "C Type"
msgstr "Type C"
#: library/struct.rst:205
2016-10-30 09:46:26 +00:00
msgid "Python type"
msgstr "Type Python"
#: library/struct.rst:205
2016-10-30 09:46:26 +00:00
msgid "Standard size"
2020-01-24 08:39:00 +00:00
msgstr "Taille standard"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:205
2016-10-30 09:46:26 +00:00
msgid "Notes"
msgstr "Notes"
#: library/struct.rst:207
2016-10-30 09:46:26 +00:00
msgid "``x``"
msgstr "``x``"
#: library/struct.rst:207
2016-10-30 09:46:26 +00:00
msgid "pad byte"
2020-01-24 08:39:00 +00:00
msgstr "octet de bourrage"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:207
2016-10-30 09:46:26 +00:00
msgid "no value"
2020-01-24 08:39:00 +00:00
msgstr "pas de valeur"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:207
msgid "\\(7)"
msgstr ""
#: library/struct.rst:209
2016-10-30 09:46:26 +00:00
msgid "``c``"
msgstr "``c``"
#: library/struct.rst:209
#, fuzzy
msgid ":c:expr:`char`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`char`"
#: library/struct.rst:209
2016-10-30 09:46:26 +00:00
msgid "bytes of length 1"
2020-01-24 08:39:00 +00:00
msgstr "*bytes* (suite d'octets) de taille 1"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:211 library/struct.rst:215
2016-10-30 09:46:26 +00:00
msgid "1"
msgstr "1"
#: library/struct.rst:211
2016-10-30 09:46:26 +00:00
msgid "``b``"
msgstr "``b``"
#: library/struct.rst:211
#, fuzzy
msgid ":c:expr:`signed char`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`signed char`"
#: library/struct.rst:213 library/struct.rst:219 library/struct.rst:223
#: library/struct.rst:227 library/struct.rst:231 library/struct.rst:236
#: library/struct.rst:248
2016-10-30 09:46:26 +00:00
msgid "integer"
2020-01-24 08:39:00 +00:00
msgstr "*int* (entier)"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:211
2019-09-04 09:35:23 +00:00
msgid "\\(1), \\(2)"
2020-01-24 08:39:00 +00:00
msgstr "\\(1), \\(2)"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:213
2016-10-30 09:46:26 +00:00
msgid "``B``"
msgstr "``B``"
#: library/struct.rst:213
#, fuzzy
msgid ":c:expr:`unsigned char`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`unsigned char`"
#: library/struct.rst:217 library/struct.rst:221 library/struct.rst:225
#: library/struct.rst:229 library/struct.rst:231
2019-09-04 09:35:23 +00:00
msgid "\\(2)"
2019-09-16 10:08:42 +00:00
msgstr "\\(2)"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:215
2016-10-30 09:46:26 +00:00
msgid "``?``"
msgstr "``?``"
#: library/struct.rst:215
#, fuzzy
msgid ":c:expr:`_Bool`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`_Bool`"
#: library/struct.rst:215
2016-10-30 09:46:26 +00:00
msgid "bool"
2020-01-24 08:39:00 +00:00
msgstr "*bool* (booléen)"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:215
2016-10-30 09:46:26 +00:00
msgid "\\(1)"
msgstr "\\(1)"
#: library/struct.rst:217
2016-10-30 09:46:26 +00:00
msgid "``h``"
msgstr "``h``"
#: library/struct.rst:217
#, fuzzy
msgid ":c:expr:`short`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`short`"
#: library/struct.rst:219 library/struct.rst:238
2016-10-30 09:46:26 +00:00
msgid "2"
msgstr "2"
#: library/struct.rst:219
2016-10-30 09:46:26 +00:00
msgid "``H``"
msgstr "``H``"
#: library/struct.rst:219
#, fuzzy
msgid ":c:expr:`unsigned short`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`unsigned short`"
#: library/struct.rst:221
2016-10-30 09:46:26 +00:00
msgid "``i``"
msgstr "``i``"
#: library/struct.rst:221
#, fuzzy
msgid ":c:expr:`int`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`int`"
#: library/struct.rst:223 library/struct.rst:227 library/struct.rst:240
2016-10-30 09:46:26 +00:00
msgid "4"
msgstr "4"
#: library/struct.rst:223
2016-10-30 09:46:26 +00:00
msgid "``I``"
msgstr "``I``"
#: library/struct.rst:223
#, fuzzy
msgid ":c:expr:`unsigned int`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`unsigned int`"
#: library/struct.rst:225
2016-10-30 09:46:26 +00:00
msgid "``l``"
msgstr "``l``"
#: library/struct.rst:225
#, fuzzy
msgid ":c:expr:`long`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`long`"
#: library/struct.rst:227
2016-10-30 09:46:26 +00:00
msgid "``L``"
msgstr "``L``"
#: library/struct.rst:227
#, fuzzy
msgid ":c:expr:`unsigned long`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`unsigned long`"
#: library/struct.rst:229
2016-10-30 09:46:26 +00:00
msgid "``q``"
msgstr "``q``"
#: library/struct.rst:229
#, fuzzy
msgid ":c:expr:`long long`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`long long`"
#: library/struct.rst:231 library/struct.rst:242
2016-10-30 09:46:26 +00:00
msgid "8"
msgstr "8"
#: library/struct.rst:231
2016-10-30 09:46:26 +00:00
msgid "``Q``"
msgstr "``Q``"
#: library/struct.rst:231
#, fuzzy
msgid ":c:expr:`unsigned long long`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`unsigned long long`"
#: library/struct.rst:234
2016-10-30 09:46:26 +00:00
msgid "``n``"
msgstr "``n``"
#: library/struct.rst:234
#, fuzzy
msgid ":c:expr:`ssize_t`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`ssize_t`"
#: library/struct.rst:236
2019-09-04 09:35:23 +00:00
msgid "\\(3)"
msgstr "\\(3)"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:236
2016-10-30 09:46:26 +00:00
msgid "``N``"
msgstr "``N``"
#: library/struct.rst:236
#, fuzzy
msgid ":c:expr:`size_t`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`size_t`"
#: library/struct.rst:238
2016-10-30 09:46:26 +00:00
msgid "``e``"
2020-01-24 08:39:00 +00:00
msgstr "``e``"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:238
2019-09-04 09:35:23 +00:00
msgid "\\(6)"
msgstr "\\(6)"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:240 library/struct.rst:242
2016-10-30 09:46:26 +00:00
msgid "float"
2020-01-24 08:39:00 +00:00
msgstr "*float* (nombre à virgule flottante)"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:240 library/struct.rst:242
2019-09-04 09:35:23 +00:00
msgid "\\(4)"
msgstr "\\(4)"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:240
2016-10-30 09:46:26 +00:00
msgid "``f``"
msgstr "``f``"
#: library/struct.rst:240
#, fuzzy
msgid ":c:expr:`float`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`float`"
#: library/struct.rst:242
2016-10-30 09:46:26 +00:00
msgid "``d``"
msgstr "``d``"
#: library/struct.rst:242
#, fuzzy
msgid ":c:expr:`double`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`double`"
#: library/struct.rst:244
2016-10-30 09:46:26 +00:00
msgid "``s``"
msgstr "``s``"
#: library/struct.rst:246
#, fuzzy
msgid ":c:expr:`char[]`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`char[]`"
#: library/struct.rst:246
2016-10-30 09:46:26 +00:00
msgid "bytes"
2020-01-24 08:39:00 +00:00
msgstr "*bytes* (séquence d'octets)"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:244
msgid "\\(9)"
msgstr ""
#: library/struct.rst:246
2016-10-30 09:46:26 +00:00
msgid "``p``"
msgstr "``p``"
#: library/struct.rst:246
msgid "\\(8)"
msgstr ""
#: library/struct.rst:248
2016-10-30 09:46:26 +00:00
msgid "``P``"
msgstr "``P``"
#: library/struct.rst:248
#, fuzzy
msgid ":c:expr:`void \\*`"
2016-10-30 09:46:26 +00:00
msgstr ":c:type:`void \\*`"
#: library/struct.rst:248
2019-09-04 09:35:23 +00:00
msgid "\\(5)"
msgstr "\\(5)"
2016-10-30 09:46:26 +00:00
2020-01-24 08:39:00 +00:00
# Suit un ':' dans la version affichée, donc pas de majuscule.
#: library/struct.rst:251
2016-10-30 09:46:26 +00:00
msgid "Added support for the ``'n'`` and ``'N'`` formats."
2020-01-24 08:39:00 +00:00
msgstr "ajouté la gestion des formats ``'n'`` et ``'N'``."
2016-10-30 09:46:26 +00:00
2020-01-24 08:39:00 +00:00
# Suit un ':' dans la version affichée, donc pas de majuscule.
#: library/struct.rst:254
2017-04-02 20:14:06 +00:00
msgid "Added support for the ``'e'`` format."
2020-01-24 08:39:00 +00:00
msgstr "ajouté la gestion du format ``'e'``."
2017-04-02 20:14:06 +00:00
#: library/struct.rst:263
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"The ``'?'`` conversion code corresponds to the :c:expr:`_Bool` type defined "
"by C99. If this type is not available, it is simulated using a :c:expr:"
2016-10-30 09:46:26 +00:00
"`char`. In standard mode, it is always represented by one byte."
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:268
2016-10-30 09:46:26 +00:00
msgid ""
"When attempting to pack a non-integer using any of the integer conversion "
"codes, if the non-integer has a :meth:`__index__` method then that method is "
"called to convert the argument to an integer before packing."
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
2020-01-24 08:39:00 +00:00
# Suit un ':' dans la version affichée, donc pas de majuscule.
#: library/struct.rst:272
2020-07-20 08:56:42 +00:00
#, fuzzy
msgid "Added use of the :meth:`__index__` method for non-integers."
2020-01-24 08:39:00 +00:00
msgstr "utilisation de la méthode :meth:`__index__` pour les non-entiers. "
2016-10-30 09:46:26 +00:00
#: library/struct.rst:276
2016-10-30 09:46:26 +00:00
msgid ""
"The ``'n'`` and ``'N'`` conversion codes are only available for the native "
"size (selected as the default or with the ``'@'`` byte order character). For "
"the standard size, you can use whichever of the other integer formats fits "
"your application."
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:282
2016-10-30 09:46:26 +00:00
msgid ""
"For the ``'f'``, ``'d'`` and ``'e'`` conversion codes, the packed "
"representation uses the IEEE 754 binary32, binary64 or binary16 format (for "
"``'f'``, ``'d'`` or ``'e'`` respectively), regardless of the floating-point "
"format used by the platform."
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:288
2016-10-30 09:46:26 +00:00
msgid ""
"The ``'P'`` format character is only available for the native byte ordering "
"(selected as the default or with the ``'@'`` byte order character). The byte "
"order character ``'='`` chooses to use little- or big-endian ordering based "
"on the host system. The struct module does not interpret this as native "
"ordering, so the ``'P'`` format is not available."
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:295
2016-10-30 09:46:26 +00:00
msgid ""
"The IEEE 754 binary16 \"half precision\" type was introduced in the 2008 "
"revision of the `IEEE 754 standard <ieee 754 standard_>`_. It has a sign "
"bit, a 5-bit exponent and 11-bit precision (with 10 bits explicitly stored), "
"and can represent numbers between approximately ``6.1e-05`` and ``6.5e+04`` "
"at full precision. This type is not widely supported by C compilers: on a "
"typical machine, an unsigned short can be used for storage, but not for math "
"operations. See the Wikipedia page on the `half-precision floating-point "
"format <half precision format_>`_ for more information."
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:305
msgid "When packing, ``'x'`` inserts one NUL byte."
2016-10-30 09:46:26 +00:00
msgstr ""
#: library/struct.rst:308
2016-10-30 09:46:26 +00:00
msgid ""
"The ``'p'`` format character encodes a \"Pascal string\", meaning a short "
"variable-length string stored in a *fixed number of bytes*, given by the "
"count. The first byte stored is the length of the string, or 255, whichever "
"is smaller. The bytes of the string follow. If the string passed in to :"
"func:`pack` is too long (longer than the count minus 1), only the leading "
"``count-1`` bytes of the string are stored. If the string is shorter than "
"``count-1``, it is padded with null bytes so that exactly count bytes in all "
"are used. Note that for :func:`unpack`, the ``'p'`` format character "
"consumes ``count`` bytes, but that the string returned can never contain "
"more than 255 bytes."
2016-10-30 09:46:26 +00:00
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."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:320
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"For the ``'s'`` format character, the count is interpreted as the length of "
"the bytes, not a repeat count like for the other format characters; for "
"example, ``'10s'`` means a single 10-byte string mapping to or from a single "
"Python byte string, while ``'10c'`` means 10 separate one byte character "
"elements (e.g., ``cccccccccc``) mapping to or from ten different Python byte "
"objects. (See :ref:`struct-examples` for a concrete demonstration of the "
"difference.) If a count is not given, it defaults to 1. For packing, the "
2016-10-30 09:46:26 +00:00
"string is truncated or padded with null bytes as appropriate to make it fit. "
"For unpacking, the resulting bytes object always has exactly the specified "
"number of bytes. As a special case, ``'0s'`` means a single, empty string "
"(while ``'0c'`` means 0 characters)."
msgstr ""
2020-01-24 08:39:00 +00:00
"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)."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:333
msgid ""
"A format character may be preceded by an integral repeat count. For "
"example, the format string ``'4h'`` means exactly the same as ``'hhhh'``."
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'``."
#: library/struct.rst:336
msgid ""
"Whitespace characters between formats are ignored; a count and its format "
"must not contain whitespace though."
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."
#: library/struct.rst:339
2016-10-30 09:46:26 +00:00
msgid ""
"When packing a value ``x`` using one of the integer formats (``'b'``, "
"``'B'``, ``'h'``, ``'H'``, ``'i'``, ``'I'``, ``'l'``, ``'L'``, ``'q'``, "
"``'Q'``), if ``x`` is outside the valid range for that format then :exc:"
"`struct.error` is raised."
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
2020-01-24 08:39:00 +00:00
# Pas de majuscule en début car cela suit un ':' dans la version affichée.
#: library/struct.rst:344
2020-07-20 08:56:42 +00:00
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
2020-07-20 08:56:42 +00:00
"Previously, some of the integer formats wrapped out-of-range values and "
"raised :exc:`DeprecationWarning` instead of :exc:`struct.error`."
2016-10-30 09:46:26 +00:00
msgstr ""
2020-01-24 08:39:00 +00:00
"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`."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:350
2016-10-30 09:46:26 +00:00
msgid ""
"For the ``'?'`` format character, the return value is either :const:`True` "
"or :const:`False`. When packing, the truth value of the argument object is "
"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."
msgstr ""
2020-01-24 08:39:00 +00:00
"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``."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:360
2016-10-30 09:46:26 +00:00
msgid "Examples"
msgstr "Exemples"
#: library/struct.rst:363
2016-10-30 09:46:26 +00:00
msgid ""
"Native byte order examples (designated by the ``'@'`` format prefix or lack "
"of any prefix character) may not match what the reader's machine produces as "
"that depends on the platform and compiler."
2016-10-30 09:46:26 +00:00
msgstr ""
#: library/struct.rst:368
msgid ""
"Pack and unpack integers of three different sizes, using big endian "
"ordering::"
msgstr ""
2016-10-30 09:46:26 +00:00
#: library/struct.rst:379
msgid "Attempt to pack an integer which is too large for the defined field::"
msgstr ""
#: library/struct.rst:386
msgid ""
"Demonstrate the difference between ``'s'`` and ``'c'`` format characters::"
msgstr ""
#: library/struct.rst:394
2016-10-30 09:46:26 +00:00
msgid ""
"Unpacked fields can be named by assigning them to variables or by wrapping "
"the result in a named tuple::"
msgstr ""
2020-01-24 08:39:00 +00:00
"Les champs dissociés peuvent être nommés en leur assignant des variables ou "
"en encapsulant le résultat dans un *n*-uplet nommé ::"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:405
2016-10-30 09:46:26 +00:00
msgid ""
"The ordering of format characters may have an impact on size in native mode "
"since padding is implicit. In standard mode, the user is responsible for "
"inserting any desired padding. Note in the first ``pack`` call below that "
"three NUL bytes were added after the packed ``'#'`` to align the following "
"integer on a four-byte boundary. In this example, the output was produced on "
"a little endian machine::"
2016-10-30 09:46:26 +00:00
msgstr ""
#: library/struct.rst:422
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"The following format ``'llh0l'`` results in two pad bytes being added at the "
"end, assuming the platform's longs are aligned on 4-byte boundaries::"
2016-10-30 09:46:26 +00:00
msgstr ""
2020-01-24 08:39:00 +00:00
"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 ::"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:432
2016-10-30 09:46:26 +00:00
msgid "Module :mod:`array`"
2020-01-24 08:39:00 +00:00
msgstr "Module :mod:`array`"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:432
2016-10-30 09:46:26 +00:00
msgid "Packed binary storage of homogeneous data."
2020-01-24 08:39:00 +00:00
msgstr "Stockage agrégé binaire de données homogènes."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:435
#, fuzzy
msgid "Module :mod:`json`"
msgstr "Module :mod:`array`"
#: library/struct.rst:435
msgid "JSON encoder and decoder."
msgstr ""
#: library/struct.rst:437
#, fuzzy
msgid "Module :mod:`pickle`"
2016-10-30 09:46:26 +00:00
msgstr "Module :mod:`xdrlib`"
#: library/struct.rst:438
msgid "Python object serialization."
msgstr ""
#: library/struct.rst:444
msgid "Applications"
msgstr ""
#: library/struct.rst:446
msgid ""
"Two main applications for the :mod:`struct` module exist, data interchange "
"between Python and C code within an application or another application "
"compiled using the same compiler (:ref:`native formats<struct-native-"
"formats>`), and data interchange between applications using agreed upon data "
"layout (:ref:`standard formats<struct-standard-formats>`). Generally "
"speaking, the format strings constructed for these two domains are distinct."
msgstr ""
#: library/struct.rst:457
#, fuzzy
msgid "Native Formats"
msgstr "Format"
#: library/struct.rst:459
msgid ""
"When constructing format strings which mimic native layouts, the compiler "
"and machine architecture determine byte ordering and padding. In such cases, "
"the ``@`` format character should be used to specify native byte ordering "
"and data sizes. Internal pad bytes are normally inserted automatically. It "
"is possible that a zero-repeat format code will be needed at the end of a "
"format string to round up to the correct byte boundary for proper alignment "
"of consective chunks of data."
msgstr ""
#: library/struct.rst:467
msgid ""
"Consider these two simple examples (on a 64-bit, little-endian machine)::"
msgstr ""
#: library/struct.rst:475
msgid ""
"Data is not padded to an 8-byte boundary at the end of the second format "
"string without the use of extra padding. A zero-repeat format code solves "
"that problem::"
msgstr ""
#: library/struct.rst:482
msgid ""
"The ``'x'`` format code can be used to specify the repeat, but for native "
"formats it is better to use a zero-repeat format like ``'0l'``."
msgstr ""
2016-10-30 09:46:26 +00:00
#: library/struct.rst:485
msgid ""
"By default, native byte ordering and alignment is used, but it is better to "
"be explicit and use the ``'@'`` prefix character."
msgstr ""
#: library/struct.rst:492
#, fuzzy
msgid "Standard Formats"
msgstr "Taille standard"
#: library/struct.rst:494
msgid ""
"When exchanging data beyond your process such as networking or storage, be "
"precise. Specify the exact byte order, size, and alignment. Do not assume "
"they match the native order of a particular machine. For example, network "
"byte order is big-endian, while many popular CPUs are little-endian. By "
"defining this explicitly, the user need not care about the specifics of the "
"platform their code is running on. The first character should typically be "
"``<`` or ``>`` (or ``!``). Padding is the responsibility of the "
"programmer. The zero-repeat format character won't work. Instead, the user "
"must explicitly add ``'x'`` pad bytes where needed. Revisiting the examples "
"from the previous section, we have::"
msgstr ""
#: library/struct.rst:521
msgid ""
"The above results (executed on a 64-bit machine) aren't guaranteed to match "
"when executed on different machines. For example, the examples below were "
"executed on a 32-bit machine::"
msgstr ""
#: library/struct.rst:536
2016-10-30 09:46:26 +00:00
msgid "Classes"
msgstr "Classes"
#: library/struct.rst:538
2016-10-30 09:46:26 +00:00
msgid "The :mod:`struct` module also defines the following type:"
2020-01-24 08:39:00 +00:00
msgstr "Le module :mod:`struct` définit aussi le type suivant :"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:543
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"Return a new Struct object which writes and reads binary data according to "
"the format string *format*. Creating a ``Struct`` object once and calling "
"its methods is more efficient than calling module-level functions with the "
"same format since the format string is only compiled once."
2016-10-30 09:46:26 +00:00
msgstr ""
2020-01-24 08:39:00 +00:00
"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."
2016-10-30 09:46:26 +00:00
2020-01-24 08:39:00 +00:00
# Pas de majuscule en début car suit un ':' dans la version affichée.
#: library/struct.rst:550
2018-09-15 20:37:31 +00:00
msgid ""
"The compiled versions of the most recent format strings passed to :class:"
"`Struct` and the module-level functions are cached, so programs that use "
"only a few format strings needn't worry about reusing a single :class:"
"`Struct` instance."
msgstr ""
2020-01-24 08:39:00 +00:00
"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`."
2018-09-15 20:37:31 +00:00
#: library/struct.rst:555
2016-10-30 09:46:26 +00:00
msgid "Compiled Struct objects support the following methods and attributes:"
msgstr ""
2020-01-24 08:39:00 +00:00
"Les objets ``Struct`` compilés gèrent les méthodes et attributs suivants :"
2016-10-30 09:46:26 +00:00
#: library/struct.rst:559
2016-10-30 09:46:26 +00:00
msgid ""
"Identical to the :func:`pack` function, using the compiled format. "
"(``len(result)`` will equal :attr:`size`.)"
msgstr ""
2020-01-24 08:39:00 +00:00
"Identique à la fonction :func:`pack`, en utilisant le format compilé "
"(``len(result)`` vaut :attr:`size`)."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:565
2016-10-30 09:46:26 +00:00
msgid "Identical to the :func:`pack_into` function, using the compiled format."
msgstr ""
2020-01-24 08:39:00 +00:00
"Identique à la fonction :func:`pack_into`, en utilisant le format compilé."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:570
2016-10-30 09:46:26 +00:00
msgid ""
"Identical to the :func:`unpack` function, using the compiled format. The "
"buffer's size in bytes must equal :attr:`size`."
msgstr ""
2020-01-24 08:39:00 +00:00
"Identique à la fonction :func:`unpack`, en utilisant le format compilé. La "
"taille du tampon *buffer* en octets doit valoir :attr:`size`."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:576
2016-10-30 09:46:26 +00:00
msgid ""
"Identical to the :func:`unpack_from` function, using the compiled format. "
2019-09-04 09:35:23 +00:00
"The buffer's size in bytes, starting at position *offset*, must be at least :"
"attr:`size`."
2016-10-30 09:46:26 +00:00
msgstr ""
2020-01-24 08:39:00 +00:00
"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`."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:583
2016-10-30 09:46:26 +00:00
msgid ""
"Identical to the :func:`iter_unpack` function, using the compiled format. "
"The buffer's size in bytes must be a multiple of :attr:`size`."
msgstr ""
2020-01-24 08:39:00 +00:00
"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`."
2016-10-30 09:46:26 +00:00
#: library/struct.rst:590
2016-10-30 09:46:26 +00:00
msgid "The format string used to construct this Struct object."
2022-11-14 15:08:57 +00:00
msgstr "La chaîne de format utilisée pour construire l'objet ``Struct``."
2016-10-30 09:46:26 +00:00
2020-01-24 08:39:00 +00:00
# Pas de majuscule car suit un ':' dans la version affichée.
#: library/struct.rst:592
2018-06-28 13:32:56 +00:00
msgid "The format string type is now :class:`str` instead of :class:`bytes`."
msgstr ""
2020-01-24 08:39:00 +00:00
"la chaîne de format est maintenant de type :class:`str` au lieu de :class:"
"`bytes`."
2018-06-28 13:32:56 +00:00
#: library/struct.rst:597
2016-10-30 09:46:26 +00:00
msgid ""
"The calculated size of the struct (and hence of the bytes object produced by "
"the :meth:`pack` method) corresponding to :attr:`format`."
msgstr ""
"La taille calculée de la structure agrégée (et donc de l'objet ``bytes`` "
2020-01-24 08:39:00 +00:00
"produit par la méthode :meth:`pack`) correspondante à :attr:`format`."
2020-10-02 08:55:01 +00:00
#~ msgid ""
#~ "This module performs conversions between Python values and C structs "
#~ "represented as Python :class:`bytes` objects. This can be used in "
#~ "handling binary data stored in files or from network connections, among "
#~ "other sources. It uses :ref:`struct-format-strings` as compact "
#~ "descriptions of the layout of the C structs and the intended conversion "
#~ "to/from Python values."
#~ 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 »).
#~ msgid ""
#~ "By default, the result of packing a given C struct includes pad bytes in "
#~ "order to maintain proper alignment for the C types involved; similarly, "
#~ "alignment is taken into account when unpacking. This behavior is chosen "
#~ "so that the bytes of a packed struct correspond exactly to the layout in "
#~ "memory of the corresponding C struct. To handle platform-independent "
#~ "data formats or omit implicit pad bytes, use ``standard`` size and "
#~ "alignment instead of ``native`` size and alignment: see :ref:`struct-"
#~ "alignment` for details."
#~ 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)."
# Pas de majuscule en début car cela suit un ':' dans la version affichée.
#~ msgid ""
#~ "All examples assume a native byte order, size, and alignment with a big-"
#~ "endian machine."
#~ 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."
#~ msgid "A basic example of packing/unpacking three integers::"
#~ msgstr "Un exemple de base d'agrégation et dissociation de trois entiers ::"
#~ msgid ""
#~ "The ordering of format characters may have an impact on size since the "
#~ "padding needed to satisfy alignment requirements is different::"
#~ 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 ::"
#~ msgid ""
#~ "This only works when native size and alignment are in effect; standard "
#~ "size and alignment does not enforce any alignment."
#~ 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."
#~ msgid "Packing and unpacking of XDR data."
#~ msgstr "Agrégation et dissociation de données XDR."
2020-10-02 08:55:01 +00:00
#~ msgid ""
#~ "The form ``'!'`` is available for those poor souls who claim they can't "
#~ "remember whether network byte order is big-endian or little-endian."
#~ 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."