-
Notifications
You must be signed in to change notification settings - Fork 380
/
struct.po
executable file
·1300 lines (1113 loc) · 50.7 KB
/
struct.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (C) 2001-2020, Python Software Foundation
# This file is distributed under the same license as the Python package.
# Maintained by the python-doc-es workteam.
# docs-es@python.org /
# https://mail.python.org/mailman3/lists/docs-es.python.org/
# Check https://github.com/python/python-docs-es/blob/3.8/TRANSLATORS to
# get the list of volunteers
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-12 19:43+0200\n"
"PO-Revision-Date: 2023-10-16 00:53-0600\n"
"Last-Translator: José Luis Salgado Banda\n"
"Language-Team: python-doc-es\n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Generated-By: Babel 2.13.0\n"
"X-Generator: Poedit 3.4\n"
#: ../Doc/library/struct.rst:2
msgid ":mod:`struct` --- Interpret bytes as packed binary data"
msgstr ":mod:`struct` --- Interpreta bytes como paquetes de datos binarios"
#: ../Doc/library/struct.rst:7
msgid "**Source code:** :source:`Lib/struct.py`"
msgstr "**Código fuente:** :source:`Lib/struct.py`"
#: ../Doc/library/struct.rst:15
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 ""
"Este módulo convierte entre valores de Python y estructuras de C "
"representadas como objetos de Python :class:`bytes`. Las :ref:`cadenas de "
"formato <struct-format-strings>` compacto describen las conversiones "
"previstas hacia/desde valores de Python. Las funciones y objetos del módulo "
"se pueden utilizar para dos aplicaciones en gran medida distintas, el "
"intercambio de datos con fuentes externas (archivos o conexiones de red) o "
"la transferencia de datos entre la aplicación de Python y la capa de C."
#: ../Doc/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 ""
"Cuando no se proporciona ningún carácter de prefijo, el modo nativo es el "
"predeterminado. Empaqueta o desempaqueta datos según la plataforma y el "
"compilador en el que se creó el intérprete de Python. El resultado de "
"empaquetar una estructura C determinada incluye bytes de relleno que "
"mantienen la alineación adecuada para los tipos C involucrados; asimismo, se "
"tiene en cuenta la alineación al desempaquetar. Por el contrario, cuando se "
"comunican datos entre fuentes externas, el programador es responsable de "
"definir el orden de bytes y el relleno entre elementos. Ver :ref:`struct-"
"alignment` para más detalles."
#: ../Doc/library/struct.rst:35
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 ""
"Varias funciones :mod:`struct` (y métodos de :class:`Struct`) toman un "
"argumento *buffer*. Esto hace referencia a los objetos que implementan :ref:"
"`bufferobjects` y proporcionan un búfer de lectura o de lectura/escritura. "
"Los tipos más comunes utilizados para ese propósito son :class:`bytes` y :"
"class:`bytearray`, pero muchos otros tipos que se pueden ver como una lista "
"de bytes implementan el protocolo de búfer, para que se puedan leer/rellenar "
"sin necesidad de copiar a partir de un objeto :class:`bytes`."
#: ../Doc/library/struct.rst:44
msgid "Functions and Exceptions"
msgstr "Funciones y excepciones"
#: ../Doc/library/struct.rst:46
msgid "The module defines the following exception and functions:"
msgstr "El módulo define la siguiente excepción y funciones:"
#: ../Doc/library/struct.rst:51
msgid ""
"Exception raised on various occasions; argument is a string describing what "
"is wrong."
msgstr ""
"Excepción lanzada en varias ocasiones; el argumento es una *string* que "
"describe lo que está mal."
#: ../Doc/library/struct.rst:57
msgid ""
"Return a bytes object containing the values *v1*, *v2*, ... packed according "
"to the format string *format*. The arguments must match the values required "
"by the format exactly."
msgstr ""
"Retorna un objeto bytes que contiene los valores *v1*, *v2*, ... empaquetado "
"de acuerdo con la cadena de formato *format*. Los argumentos deben "
"coincidir exactamente con los valores requeridos por el formato."
#: ../Doc/library/struct.rst:64
msgid ""
"Pack the values *v1*, *v2*, ... according to the format string *format* and "
"write the packed bytes into the writable buffer *buffer* starting at "
"position *offset*. Note that *offset* is a required argument."
msgstr ""
"Empaqueta los valores *v1*, *v2*, ... de acuerdo con la cadena de formato "
"*format* y escribe los bytes empaquetados en el búfer de escritura *buffer* "
"comenzando en la posición *offset*. Nota: *offset* es un argumento "
"obligatorio."
#: ../Doc/library/struct.rst:71
msgid ""
"Unpack from the buffer *buffer* (presumably packed by ``pack(format, ...)``) "
"according to the format string *format*. The result is a tuple even if it "
"contains exactly one item. The buffer's size in bytes must match the size "
"required by the format, as reflected by :func:`calcsize`."
msgstr ""
"Desempaqueta del búfer *buffer* (normalmente empaquetado por "
"``pack(format, ...)``) según la cadena de formato *format*. El resultado es "
"una tupla incluso si contiene un solo elemento. El tamaño del búfer en "
"bytes debe coincidir con el tamaño requerido por el formato, como se refleja "
"en :func:`calcsize`."
#: ../Doc/library/struct.rst:79
msgid ""
"Unpack from *buffer* starting at position *offset*, according to the format "
"string *format*. The result is a tuple even if it contains exactly one "
"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`."
msgstr ""
"Desempaqueta del *buffer* comenzando en la posición *offset*, según la "
"cadena de formato *format*. El resultado es una tupla incluso si contiene "
"un solo elemento. El tamaño del búfer en bytes, comenzando en la posición "
"*offset*, debe tener al menos el tamaño requerido por el formato, como se "
"refleja en :func:`calcsize`."
#: ../Doc/library/struct.rst:87
msgid ""
"Iteratively unpack from the buffer *buffer* according to the format string "
"*format*. This function returns an iterator which will read equally sized "
"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 ""
"Desempaqueta de manera iterativa desde el búfer *buffer* según la cadena de "
"formato *format*. Esta función retorna un iterador que leerá fragmentos de "
"igual tamaño desde el búfer hasta que se haya consumido todo su contenido. "
"El tamaño del búfer en bytes debe ser un múltiplo del tamaño requerido por "
"el formato, como se refleja en :func:`calcsize`."
#: ../Doc/library/struct.rst:93
msgid "Each iteration yields a tuple as specified by the format string."
msgstr ""
"Cada iteración produce una tupla según lo especificado por la cadena de "
"formato."
#: ../Doc/library/struct.rst:100
msgid ""
"Return the size of the struct (and hence of the bytes object produced by "
"``pack(format, ...)``) corresponding to the format string *format*."
msgstr ""
"Retorna el tamaño de la estructura (y, por lo tanto, del objeto bytes "
"generado por ``pack(format, ...)``) correspondiente a la cadena de formato "
"*format*."
#: ../Doc/library/struct.rst:107
msgid "Format Strings"
msgstr "Cadenas de formato"
#: ../Doc/library/struct.rst:109
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."
msgstr ""
"Las cadenas de formato describen el diseño de los datos cuando empaquetan y "
"desempaquetan datos. Se construyen a partir :ref:`caracteres de "
"formato<format-characters>`, que especifican el tipo de datos que se "
"empaquetan/desempaquetan. Además, los caracteres especiales controlan el :"
"ref:`orden de bytes, tamaño y alineación<struct-alignment>`. Cada cadena de "
"formato consta de un carácter de prefijo opcional que describe las "
"propiedades generales de los datos y uno o más caracteres de formato que "
"describen los valores de datos actuales y el relleno."
#: ../Doc/library/struct.rst:121
msgid "Byte Order, Size, and Alignment"
msgstr "Orden de bytes, tamaño y alineación"
#: ../Doc/library/struct.rst:123
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."
msgstr ""
"Por defecto, los tipos C se representan en el formato nativo y el orden de "
"bytes de la máquina, y se alinean correctamente omitiendo *bytes* de relleno "
"si es necesario (según las reglas utilizadas por el compilador de C). Se "
"elige este comportamiento para que los bytes de una estructura empaquetada "
"correspondan correctamente al diseño de memoria de la estructura C "
"correspondiente. El uso de ordenamiento y relleno de bytes nativos o "
"formatos estándar depende de la aplicación."
#: ../Doc/library/struct.rst:139
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 ""
"Como alternativa, el primer carácter de la cadena de formato se puede "
"utilizar para indicar el orden de bytes, el tamaño y la alineación de los "
"datos empaquetados, según la tabla siguiente:"
#: ../Doc/library/struct.rst:144
msgid "Character"
msgstr "Carácter"
#: ../Doc/library/struct.rst:144
msgid "Byte order"
msgstr "Orden de bytes"
#: ../Doc/library/struct.rst:144
msgid "Size"
msgstr "Tamaño"
#: ../Doc/library/struct.rst:144
msgid "Alignment"
msgstr "Alineamiento"
#: ../Doc/library/struct.rst:146
msgid "``@``"
msgstr "``@``"
#: ../Doc/library/struct.rst:146 ../Doc/library/struct.rst:148
msgid "native"
msgstr "nativo"
#: ../Doc/library/struct.rst:148
msgid "``=``"
msgstr "``=``"
#: ../Doc/library/struct.rst:148 ../Doc/library/struct.rst:150
#: ../Doc/library/struct.rst:152 ../Doc/library/struct.rst:154
msgid "standard"
msgstr "standard"
#: ../Doc/library/struct.rst:148 ../Doc/library/struct.rst:150
#: ../Doc/library/struct.rst:152 ../Doc/library/struct.rst:154
msgid "none"
msgstr "none"
#: ../Doc/library/struct.rst:150
msgid "``<``"
msgstr "``<``"
#: ../Doc/library/struct.rst:150
msgid "little-endian"
msgstr "little-endian"
#: ../Doc/library/struct.rst:152
msgid "``>``"
msgstr "``>``"
#: ../Doc/library/struct.rst:152
msgid "big-endian"
msgstr "big-endian"
#: ../Doc/library/struct.rst:154
msgid "``!``"
msgstr "``!``"
#: ../Doc/library/struct.rst:154
msgid "network (= big-endian)"
msgstr "red (= big-endian)"
#: ../Doc/library/struct.rst:157
msgid "If the first character is not one of these, ``'@'`` is assumed."
msgstr "Si el primer carácter no es uno de estos, se asume ``'@'``."
#: ../Doc/library/struct.rst:159
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."
msgstr ""
"El orden de bytes nativo es big-endian o little-endian, dependiendo del "
"sistema host. Por ejemplo, Intel x86, AMD64 (x86-64) y Apple M1 son little-"
"endian; IBM z y muchas arquitecturas heredadas son big-endian; ARM e Intel "
"*Itanium* tienen la propiedad de trabajar con ambos formatos (middle-"
"endian). Utiliza :data:`sys.byteorder` para comprobar la endianness "
"(\"extremidad\") de tu sistema."
#: ../Doc/library/struct.rst:164
msgid ""
"Native size and alignment are determined using the C compiler's ``sizeof`` "
"expression. This is always combined with native byte order."
msgstr ""
"El tamaño y la alineación nativos se determinan mediante la expresión "
"``sizeof`` del compilador de C. Esto siempre se combina con el orden de "
"bytes nativo."
#: ../Doc/library/struct.rst:167
msgid ""
"Standard size depends only on the format character; see the table in the :"
"ref:`format-characters` section."
msgstr ""
"El tamaño estándar depende únicamente del carácter de formato; ver la tabla "
"en la sección :ref:`format-characters`."
#: ../Doc/library/struct.rst:170
msgid ""
"Note the difference between ``'@'`` and ``'='``: both use native byte order, "
"but the size and alignment of the latter is standardized."
msgstr ""
"Nótese la diferencia entre ``'@'`` y ``'='`` : ambos utilizan el orden de "
"bytes nativo, pero el tamaño y la alineación de este último está "
"estandarizado."
#: ../Doc/library/struct.rst:173
msgid ""
"The form ``'!'`` represents the network byte order which is always big-"
"endian as defined in `IETF RFC 1700 <IETF RFC 1700_>`_."
msgstr ""
"La forma ``'!'`` representa el orden de bytes en la red, el cuál siempre es "
"big-endian tal como se define en `IETF RFC 1700 <IETF RFC 1700_>`_."
#: ../Doc/library/struct.rst:176
msgid ""
"There is no way to indicate non-native byte order (force byte-swapping); use "
"the appropriate choice of ``'<'`` or ``'>'``."
msgstr ""
"No hay manera de indicar el orden de bytes no nativo (forzar el intercambio "
"de bytes); utiliza la elección adecuada de ``'<'`` o ``'>'``."
#: ../Doc/library/struct.rst:179 ../Doc/library/struct.rst:258
msgid "Notes:"
msgstr "Notas:"
#: ../Doc/library/struct.rst:181
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 ""
"El relleno solo se agrega automáticamente entre los miembros sucesivos de la "
"estructura. No se agrega ningún relleno al principio o al final de la "
"estructura codificada."
#: ../Doc/library/struct.rst:184
msgid ""
"No padding is added when using non-native size and alignment, e.g. with '<', "
"'>', '=', and '!'."
msgstr ""
"No se añade ningún relleno cuando se utiliza el tamaño y la alineación no "
"nativos, por ejemplo, con '<', '>', '=' y '!'."
#: ../Doc/library/struct.rst:187
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 ""
"Para alinear el final de una estructura con el requisito de alineación de un "
"tipo determinado, termina el formato con el código de ese tipo con un conteo "
"repetido de ceros. Véase :ref:`struct-examples`."
#: ../Doc/library/struct.rst:195
msgid "Format Characters"
msgstr "Caracteres de formato"
#: ../Doc/library/struct.rst:197
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 ""
"Los caracteres de formato tienen el siguiente significado; la conversión "
"entre los valores de C y Python debe ser obvia dados sus tipos. La columna "
"'Tamaño estándar' hace referencia al tamaño del valor empaquetado en bytes "
"cuando se utiliza el tamaño estándar; es decir, cuando la cadena de formato "
"comienza con uno de ``'<'``, ``'>'``, ``'!'`` o ``'='``. Cuando se utiliza "
"el tamaño nativo, el tamaño del valor empaquetado depende de la plataforma."
#: ../Doc/library/struct.rst:205
msgid "Format"
msgstr "Formato"
#: ../Doc/library/struct.rst:205
msgid "C Type"
msgstr "Tipo C"
#: ../Doc/library/struct.rst:205
msgid "Python type"
msgstr "Tipo Python"
#: ../Doc/library/struct.rst:205
msgid "Standard size"
msgstr "Tamaño estándar"
#: ../Doc/library/struct.rst:205
msgid "Notes"
msgstr "Notas"
#: ../Doc/library/struct.rst:207
msgid "``x``"
msgstr "``x``"
#: ../Doc/library/struct.rst:207
msgid "pad byte"
msgstr "byte de relleno"
#: ../Doc/library/struct.rst:207
msgid "no value"
msgstr "sin valor"
#: ../Doc/library/struct.rst:207
msgid "\\(7)"
msgstr "\\(7)"
#: ../Doc/library/struct.rst:209
msgid "``c``"
msgstr "``c``"
#: ../Doc/library/struct.rst:209
msgid ":c:expr:`char`"
msgstr ":c:expr:`char`"
#: ../Doc/library/struct.rst:209
msgid "bytes of length 1"
msgstr "bytes de longitud 1"
#: ../Doc/library/struct.rst:209 ../Doc/library/struct.rst:211
#: ../Doc/library/struct.rst:213 ../Doc/library/struct.rst:215
msgid "1"
msgstr "1"
#: ../Doc/library/struct.rst:211
msgid "``b``"
msgstr "``b``"
#: ../Doc/library/struct.rst:211
msgid ":c:expr:`signed char`"
msgstr ":c:expr:`signed char`"
#: ../Doc/library/struct.rst:211 ../Doc/library/struct.rst:213
#: ../Doc/library/struct.rst:217 ../Doc/library/struct.rst:219
#: ../Doc/library/struct.rst:221 ../Doc/library/struct.rst:223
#: ../Doc/library/struct.rst:225 ../Doc/library/struct.rst:227
#: ../Doc/library/struct.rst:229 ../Doc/library/struct.rst:231
#: ../Doc/library/struct.rst:234 ../Doc/library/struct.rst:236
#: ../Doc/library/struct.rst:248
msgid "integer"
msgstr "integer"
#: ../Doc/library/struct.rst:211
msgid "\\(1), \\(2)"
msgstr "\\(1), \\(2)"
#: ../Doc/library/struct.rst:213
msgid "``B``"
msgstr "``B``"
#: ../Doc/library/struct.rst:213
msgid ":c:expr:`unsigned char`"
msgstr ":c:expr:`unsigned char`"
#: ../Doc/library/struct.rst:213 ../Doc/library/struct.rst:217
#: ../Doc/library/struct.rst:219 ../Doc/library/struct.rst:221
#: ../Doc/library/struct.rst:223 ../Doc/library/struct.rst:225
#: ../Doc/library/struct.rst:227 ../Doc/library/struct.rst:229
#: ../Doc/library/struct.rst:231
msgid "\\(2)"
msgstr "\\(2)"
#: ../Doc/library/struct.rst:215
msgid "``?``"
msgstr "\\(2)"
#: ../Doc/library/struct.rst:215
msgid ":c:expr:`_Bool`"
msgstr ":c:expr:`_Bool`"
#: ../Doc/library/struct.rst:215
msgid "bool"
msgstr "bool"
#: ../Doc/library/struct.rst:215
msgid "\\(1)"
msgstr "\\(1)"
#: ../Doc/library/struct.rst:217
msgid "``h``"
msgstr "``h``"
#: ../Doc/library/struct.rst:217
msgid ":c:expr:`short`"
msgstr ":c:expr:`short`"
#: ../Doc/library/struct.rst:217 ../Doc/library/struct.rst:219
#: ../Doc/library/struct.rst:238
msgid "2"
msgstr "2"
#: ../Doc/library/struct.rst:219
msgid "``H``"
msgstr "``H``"
#: ../Doc/library/struct.rst:219
msgid ":c:expr:`unsigned short`"
msgstr ":c:expr:`unsigned short`"
#: ../Doc/library/struct.rst:221
msgid "``i``"
msgstr "``i``"
#: ../Doc/library/struct.rst:221
msgid ":c:expr:`int`"
msgstr ":c:expr:`int`"
#: ../Doc/library/struct.rst:221 ../Doc/library/struct.rst:223
#: ../Doc/library/struct.rst:225 ../Doc/library/struct.rst:227
#: ../Doc/library/struct.rst:240
msgid "4"
msgstr "4"
#: ../Doc/library/struct.rst:223
msgid "``I``"
msgstr "``I``"
#: ../Doc/library/struct.rst:223
msgid ":c:expr:`unsigned int`"
msgstr ":c:expr:`unsigned int`"
#: ../Doc/library/struct.rst:225
msgid "``l``"
msgstr "``l``"
#: ../Doc/library/struct.rst:225
msgid ":c:expr:`long`"
msgstr ":c:expr:`long`"
#: ../Doc/library/struct.rst:227
msgid "``L``"
msgstr "``L``"
#: ../Doc/library/struct.rst:227
msgid ":c:expr:`unsigned long`"
msgstr ":c:expr:`unsigned long`"
#: ../Doc/library/struct.rst:229
msgid "``q``"
msgstr "``q``"
#: ../Doc/library/struct.rst:229
msgid ":c:expr:`long long`"
msgstr ":c:expr:`long long`"
#: ../Doc/library/struct.rst:229 ../Doc/library/struct.rst:231
#: ../Doc/library/struct.rst:242
msgid "8"
msgstr "8"
#: ../Doc/library/struct.rst:231
msgid "``Q``"
msgstr "``Q``"
#: ../Doc/library/struct.rst:231
msgid ":c:expr:`unsigned long long`"
msgstr ":c:expr:`unsigned long long`"
#: ../Doc/library/struct.rst:234
msgid "``n``"
msgstr "``n``"
#: ../Doc/library/struct.rst:234
msgid ":c:type:`ssize_t`"
msgstr ":c:type:`ssize_t`"
#: ../Doc/library/struct.rst:234 ../Doc/library/struct.rst:236
msgid "\\(3)"
msgstr "\\(3)"
#: ../Doc/library/struct.rst:236
msgid "``N``"
msgstr "``N``"
#: ../Doc/library/struct.rst:236
msgid ":c:type:`size_t`"
msgstr ":c:type:`size_t`"
#: ../Doc/library/struct.rst:238
msgid "``e``"
msgstr "``e``"
#: ../Doc/library/struct.rst:238
msgid "\\(6)"
msgstr "\\(6)"
#: ../Doc/library/struct.rst:238 ../Doc/library/struct.rst:240
#: ../Doc/library/struct.rst:242
msgid "float"
msgstr "float"
#: ../Doc/library/struct.rst:238 ../Doc/library/struct.rst:240
#: ../Doc/library/struct.rst:242
msgid "\\(4)"
msgstr "\\(4)"
#: ../Doc/library/struct.rst:240
msgid "``f``"
msgstr "``f``"
#: ../Doc/library/struct.rst:240
msgid ":c:expr:`float`"
msgstr ":c:expr:`float`"
#: ../Doc/library/struct.rst:242
msgid "``d``"
msgstr "``d``"
#: ../Doc/library/struct.rst:242
msgid ":c:expr:`double`"
msgstr ":c:expr:`double`"
#: ../Doc/library/struct.rst:244
msgid "``s``"
msgstr "``s``"
#: ../Doc/library/struct.rst:244 ../Doc/library/struct.rst:246
msgid ":c:expr:`char[]`"
msgstr ":c:expr:`char[]`"
#: ../Doc/library/struct.rst:244 ../Doc/library/struct.rst:246
msgid "bytes"
msgstr "bytes"
#: ../Doc/library/struct.rst:244
msgid "\\(9)"
msgstr "\\(9)"
#: ../Doc/library/struct.rst:246
msgid "``p``"
msgstr "``p``"
#: ../Doc/library/struct.rst:246
msgid "\\(8)"
msgstr "\\(8)"
#: ../Doc/library/struct.rst:248
msgid "``P``"
msgstr "``P``"
#: ../Doc/library/struct.rst:248
msgid ":c:expr:`void \\*`"
msgstr ":c:expr:`void \\*`"
#: ../Doc/library/struct.rst:248
msgid "\\(5)"
msgstr "\\(5)"
#: ../Doc/library/struct.rst:251
msgid "Added support for the ``'n'`` and ``'N'`` formats."
msgstr "Soporte añadido para los formatos ``'n'`` y ``'N'``."
#: ../Doc/library/struct.rst:254
msgid "Added support for the ``'e'`` format."
msgstr "Soporte añadido para el formato ``'e'``."
#: ../Doc/library/struct.rst:263
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:"
"`char`. In standard mode, it is always represented by one byte."
msgstr ""
"El código de conversión ``'?'`` corresponde al tipo :c:expr:`_Bool` definido "
"por C99. Si este tipo no está disponible, se simula mediante un :c:expr:"
"`char`. En el modo estándar, siempre se representa mediante un byte."
#: ../Doc/library/struct.rst:268
msgid ""
"When attempting to pack a non-integer using any of the integer conversion "
"codes, if the non-integer has a :meth:`~object.__index__` method then that "
"method is called to convert the argument to an integer before packing."
msgstr ""
"Al intentar empaquetar un no entero mediante cualquiera de los códigos de "
"conversión de enteros, si el no entero tiene un método :meth:`~object."
"__index__`, se llama a ese método para convertir el argumento en un entero "
"antes de empaquetar."
#: ../Doc/library/struct.rst:272
msgid "Added use of the :meth:`~object.__index__` method for non-integers."
msgstr ""
"Agregado el uso del método :meth:`~object.__index__` para los no enteros."
#: ../Doc/library/struct.rst:276
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 ""
"Los códigos de conversión ``'n'`` y ``'N'`` solo están disponibles para el "
"tamaño nativo (seleccionado como predeterminado o con el carácter de orden "
"de bytes ``'@'``). Para el tamaño estándar, puedes usar cualquiera de los "
"otros formatos enteros que se ajusten a tu aplicación."
#: ../Doc/library/struct.rst:282
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 ""
"Para los códigos de conversión ``'f'``, ``'d'`` y ``'e'``, la representación "
"empaquetada utiliza el formato IEEE 754 binary32, binary64 o binary16 (para "
"``'f'``, ``'d'`` o ``'e'`` respectivamente), independientemente del formato "
"de punto flotante utilizado por la plataforma."
#: ../Doc/library/struct.rst:288
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 ""
"El carácter de formato ``'P'`` solo está disponible para el orden nativo de "
"bytes (seleccionado como predeterminado o con el carácter de orden de bytes "
"``'@'``). El carácter de orden de bytes ``'='`` elige utilizar el orden "
"little- o big-endian basado en el sistema host. El módulo *struct* no "
"interpreta esto como un orden nativo, por lo que el formato ``'P'`` no está "
"disponible."
#: ../Doc/library/struct.rst:295
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 ""
"El tipo IEEE 754 binary16 \"half precision\" se introdujo en la revisión de "
"2008 del `IEEE 754 estándar <ieee 754 standard_>`_. Tiene un bit de signo, "
"un exponente de 5 bits y una precisión de 11 bits (con 10 bits almacenados "
"explícitamente) y puede representar números entre aproximadamente "
"``6.1e-05`` y ``6.5e+04`` con total precisión. Este tipo no es ampliamente "
"compatible con los compiladores de C: en un equipo típico, un *unsigned* "
"short se puede usar para el almacenamiento, pero no para las operaciones "
"matemáticas. Consulte la página de Wikipedia en el `formato de punto "
"flotante de media precisión <half precision format_>`_ para obtener más "
"información."
#: ../Doc/library/struct.rst:305
msgid "When packing, ``'x'`` inserts one NUL byte."
msgstr "Al empaquetar, ``'x'`` inserta un byte NUL."
#: ../Doc/library/struct.rst:308
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."
msgstr ""
"El carácter de formato ``'p'`` codifica una \"cadena de Pascal\", lo que "
"significa una cadena de longitud variable corta almacenada en un número "
"*fijo de bytes*, dado por el recuento. El primer byte almacenado es el valor "
"mínimo entre la longitud de la cadena o 255. A continuación se encuentran "
"los bytes de la cadena. Si la cadena pasada a :func:`pack` es demasiado "
"larga (más larga que la cuenta menos 1), solo se almacenan los bytes "
"iniciales ``count-1`` de la cadena. Si la cadena es más corta que "
"``count-1``, se rellena con bytes nulos para que se utilicen exactamente los "
"bytes de recuento en total. Tenga en cuenta que para :func:`unpack`, el "
"carácter de formato ``'p'`` consume bytes ``count``, pero que la cadena "
"retornada nunca puede contener más de 255 bytes."
#: ../Doc/library/struct.rst:320
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 "
"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 ""
"Para el carácter de formato ``'s'``, el recuento se interpreta como la "
"longitud de los bytes, no un recuento de repetición como para los otros "
"caracteres de formato; por ejemplo, ``'10s'`` significa una sola cadena de "
"10 bytes asignada hacia o desde una sola cadena de bytes de Python, mientras "
"que ``'10c'`` significa 10 elementos de caracteres separados de un byte (por "
"ejemplo, ``cccccccccc``) asignada hacia o desde diez objetos de *bytes* de "
"Python diferentes. (Ver :ref:`struct-examples` para una demostración "
"concreta de la diferencia.) Si no se da un recuento, el valor predeterminado "
"es 1. Para el empaquetado, la cadena es truncada o rellenada con bytes nulos "
"según corresponda para que se ajuste. Para desempaquetar, el objeto bytes "
"resultante siempre tiene exactamente el número especificado de bytes. Como "
"caso especial, ``'0s'`` significa una sola cadena vacía (mientras que "
"``'0c'`` significa 0 caracteres)."
#: ../Doc/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 carácter de formato puede ir precedido de un número de recuento que "
"repite tantas veces el carácter. Por ejemplo, la cadena de formato ``'4h'`` "
"significa exactamente lo mismo que ``'hhhh'`` ."
#: ../Doc/library/struct.rst:336
msgid ""
"Whitespace characters between formats are ignored; a count and its format "
"must not contain whitespace though."
msgstr ""
"Se omiten los caracteres de espacio entre formatos; sin embargo, un recuento "
"y su formato no deben contener espacios en blanco."
#: ../Doc/library/struct.rst:339
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 ""
"Al empaquetar un valor ``x`` utilizando uno de los formatos enteros "
"(``'b'``, ``'B'``, ``'h'``, ``'H'``, ``'i'``, ``'I'``, ``'l'``, ``'L'``, "
"``'q'``, ``'Q'``), si ``x`` está fuera de un rango válido para ese formato, "
"entonces se lanza la excepción :exc:`struct.error`."
#: ../Doc/library/struct.rst:344
msgid ""
"Previously, some of the integer formats wrapped out-of-range values and "
"raised :exc:`DeprecationWarning` instead of :exc:`struct.error`."
msgstr ""
"Anteriormente, algunos de los formatos enteros ajustaban los valores fuera "
"de rango y lanzaban :exc:`DeprecationWarning` en vez de :exc:`struct.error`."
#: ../Doc/library/struct.rst:350
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 ""
"Para el carácter de formato ``'?'``, el valor retornado es :const:`True` o :"
"const:`False`. Al empaquetar, se utiliza el valor verdadero del objeto del "
"argumento. Se empaquetará 0 o 1 en la representación *bool* nativa o "
"estándar, y cualquier valor distinto de cero será ``True`` al desempaquetar."
#: ../Doc/library/struct.rst:360
msgid "Examples"
msgstr "Ejemplos"
#: ../Doc/library/struct.rst:363
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."
msgstr ""
"Los ejemplos de orden de bytes nativos (designados por el prefijo de formato "
"``'@'`` o la falta de cualquier carácter de prefijo) pueden no coincidir con "
"lo que produce la máquina del lector, ya que eso depende de la plataforma y "
"el compilador."
#: ../Doc/library/struct.rst:368
msgid ""
"Pack and unpack integers of three different sizes, using big endian "
"ordering::"
msgstr ""
"Empaqueta y desempaqueta enteros de tres tamaños diferentes, utilizando el "
"orden *big endian*::"
#: ../Doc/library/struct.rst:379
msgid "Attempt to pack an integer which is too large for the defined field::"
msgstr ""
"Intenta empaquetar un entero que es demasiado grande para el campo definido::"
#: ../Doc/library/struct.rst:386
msgid ""
"Demonstrate the difference between ``'s'`` and ``'c'`` format characters::"
msgstr ""
"Demuestra la diferencia entre los caracteres de formato ``'s'`` y ``'c'``::"
#: ../Doc/library/struct.rst:394
msgid ""
"Unpacked fields can be named by assigning them to variables or by wrapping "
"the result in a named tuple::"
msgstr ""
"Los campos desempaquetados se pueden nombrar asignándolos a variables o "
"ajustando el resultado en una tupla con nombre::"
#: ../Doc/library/struct.rst:405
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::"
msgstr ""
"El orden de los caracteres de formato puede afectar el tamaño en el modo "
"nativo, ya que el relleno está implícito. En el modo estándar, el usuario es "
"responsable de insertar el relleno que desee. Toma en cuenta que en la "
"primera llamada ``pack`` a continuación se agregaron tres bytes NUL después "
"del ``'#'`` empaquetado para alinear el siguiente entero en un límite de "
"cuatro bytes. En este ejemplo, el resultado se produjo en una máquina little "
"endian::"
#: ../Doc/library/struct.rst:422
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::"
msgstr ""
"El siguiente formato ``'llh0l'`` especifica dos bytes de relleno al final, "
"suponiendo que los tipos *longs* están alineados en los límites de 4 bytes::"
#: ../Doc/library/struct.rst:432
msgid "Module :mod:`array`"
msgstr "Módulo :mod:`array`"
#: ../Doc/library/struct.rst:432
msgid "Packed binary storage of homogeneous data."
msgstr "Almacenamiento binario empaquetado de datos homogéneos."
#: ../Doc/library/struct.rst:435
msgid "Module :mod:`json`"
msgstr "Módulo :mod:`json`"
#: ../Doc/library/struct.rst:435
msgid "JSON encoder and decoder."
msgstr "Codificador y decodificador JSON."
#: ../Doc/library/struct.rst:437
msgid "Module :mod:`pickle`"
msgstr "Módulo :mod:`pickle`"
#: ../Doc/library/struct.rst:438
msgid "Python object serialization."
msgstr "Serialización de objetos Python."
#: ../Doc/library/struct.rst:444
msgid "Applications"
msgstr "Aplicaciones"
#: ../Doc/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 ""
"Existen dos aplicaciones principales para el módulo :mod:`struct`, el "
"intercambio de datos entre el código Python y C dentro de una aplicación u "
"otra aplicación compilada usando el mismo compilador (:ref:`formatos "
"nativos<struct-native-formats>`) y el intercambio de datos entre "
"aplicaciones usando un diseño de datos acordado (:ref:`formatos estándar "
"<struct-standard-formats>`). En términos generales, las cadenas de formato "
"construidas para estos dos dominios son distintas."
#: ../Doc/library/struct.rst:457
msgid "Native Formats"