Skip to content

Commit bfd96c3

Browse files
Copilotmattwang44
andcommitted
Translate format character details and technical notes
Co-authored-by: mattwang44 <24987826+mattwang44@users.noreply.github.com>
1 parent bcbf796 commit bfd96c3

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

library/struct.po

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,11 @@ msgstr "``x``"
403403

404404
#: ../../library/struct.rst:226
405405
msgid "pad byte"
406-
msgstr ""
406+
msgstr "填充位元組"
407407

408408
#: ../../library/struct.rst:226
409409
msgid "no value"
410-
msgstr ""
410+
msgstr "無值"
411411

412412
#: ../../library/struct.rst:226
413413
msgid "\\(7)"
@@ -423,7 +423,7 @@ msgstr ":c:expr:`char`"
423423

424424
#: ../../library/struct.rst:228
425425
msgid "bytes of length 1"
426-
msgstr ""
426+
msgstr "長度為 1 的位元組"
427427

428428
#: ../../library/struct.rst:228 ../../library/struct.rst:230
429429
#: ../../library/struct.rst:232 ../../library/struct.rst:234
@@ -446,7 +446,7 @@ msgstr ":c:expr:`signed char`"
446446
#: ../../library/struct.rst:253 ../../library/struct.rst:255
447447
#: ../../library/struct.rst:267
448448
msgid "integer"
449-
msgstr ""
449+
msgstr "整數"
450450

451451
#: ../../library/struct.rst:230
452452
msgid "\\(1), \\(2)"
@@ -628,7 +628,7 @@ msgstr ":c:expr:`char[]`"
628628

629629
#: ../../library/struct.rst:263 ../../library/struct.rst:265
630630
msgid "bytes"
631-
msgstr ""
631+
msgstr "位元組"
632632

633633
#: ../../library/struct.rst:263
634634
msgid "\\(9)"
@@ -667,13 +667,17 @@ msgid ""
667667
"The ``'?'`` conversion code corresponds to the :c:expr:`_Bool` type defined "
668668
"by C standards since C99. In standard mode, it is represented by one byte."
669669
msgstr ""
670+
"``'?'`` 轉換代碼對應於自 C99 以來 C 標準定義的\\ :c:expr:`_Bool` 型別。\\"
671+
"在標準模式下,它由一個位元組表示。"
670672

671673
#: ../../library/struct.rst:287
672674
msgid ""
673675
"When attempting to pack a non-integer using any of the integer conversion "
674676
"codes, if the non-integer has a :meth:`~object.__index__` method then that "
675677
"method is called to convert the argument to an integer before packing."
676678
msgstr ""
679+
"當嘗試使用任何整數轉換代碼打包非整數時,如果非整數具有\\ :meth:`~object.__index__` \\"
680+
"方法,則會呼叫該方法在打包之前將引數轉換為整數。"
677681

678682
#: ../../library/struct.rst:291
679683
msgid "Added use of the :meth:`~object.__index__` method for non-integers."
@@ -686,6 +690,8 @@ msgid ""
686690
"the standard size, you can use whichever of the other integer formats fits "
687691
"your application."
688692
msgstr ""
693+
"``'n'`` 和 ``'N'`` 轉換代碼僅適用於原生大小(作為預設選擇或使用 ``'@'`` \\"
694+
"位元組順序字元)。對於標準大小,您可以使用適合您應用程式的其他整數格式。"
689695

690696
#: ../../library/struct.rst:301
691697
msgid ""
@@ -694,6 +700,9 @@ msgid ""
694700
"``'f'``, ``'d'`` or ``'e'`` respectively), regardless of the floating-point "
695701
"format used by the platform."
696702
msgstr ""
703+
"對於 ``'f'``、``'d'`` 和 ``'e'`` 轉換代碼,打包表示法使用 IEEE 754 binary32、\\"
704+
"binary64 或 binary16 格式(分別對應於 ``'f'``、``'d'`` 或 ``'e'``),無論平台\\"
705+
"使用何種浮點數格式。"
697706

698707
#: ../../library/struct.rst:307
699708
msgid ""
@@ -703,6 +712,9 @@ msgid ""
703712
"on the host system. The struct module does not interpret this as native "
704713
"ordering, so the ``'P'`` format is not available."
705714
msgstr ""
715+
"``'P'`` 格式字元僅適用於原生位元組順序(作為預設選擇或使用 ``'@'`` 位元組順序字元)。\\"
716+
"位元組順序字元 ``'='`` 根據主機系統選擇使用小端序或大端序。struct 模組不將其解釋為\\"
717+
"原生順序,因此 ``'P'`` 格式不可用。"
706718

707719
#: ../../library/struct.rst:314
708720
msgid ""
@@ -715,10 +727,16 @@ msgid ""
715727
"operations. See the Wikipedia page on the `half-precision floating-point "
716728
"format <half precision format_>`_ for more information."
717729
msgstr ""
730+
"IEEE 754 binary16「半精度」型別是在 2008 年的 `IEEE 754 標準 <ieee 754 standard_>`_ \\"
731+
"修訂版中引入的。它有一個符號位元、5 位元指數和 11 位元精度(明確儲存 10 位元),\\"
732+
"可以全精度表示大約 ``6.1e-05`` 到 ``6.5e+04`` 之間的數字。此型別未被 C 編譯器\\"
733+
"廣泛支援:在典型機器上,unsigned short 可以用於儲存,但不能用於數學運算。\\"
734+
"請參見 Wikipedia 上的\\ `半精度浮點數格式 <half precision format_>`_ 頁面以取得\\"
735+
"更多資訊。"
718736

719737
#: ../../library/struct.rst:324
720738
msgid "When packing, ``'x'`` inserts one NUL byte."
721-
msgstr ""
739+
msgstr "打包時,``'x'`` 插入一個 NUL 位元組。"
722740

723741
#: ../../library/struct.rst:327
724742
msgid ""
@@ -733,6 +751,12 @@ msgid ""
733751
"character consumes ``count`` bytes, but that the string returned can never "
734752
"contain more than 255 bytes."
735753
msgstr ""
754+
"``'p'`` 格式字元編碼一個「Pascal 字串」,意思是儲存在 *固定位元組數* 中的短變長\\"
755+
"字串,由計數指定。儲存的第一個位元組是字串的長度,或 255,取較小者。字串的位元組\\"
756+
"在其後。如果傳遞給\\ :func:`pack` 的字串太長(長於計數減 1),則只儲存字串的前 \\"
757+
"``count-1`` 個位元組。如果字串短於 ``count-1``,則用空位元組填充,使得總共使用\\"
758+
"恰好 count 個位元組。請注意,對於\\ :func:`unpack`,``'p'`` 格式字元消耗 ``count`` \\"
759+
"個位元組,但回傳的字串永遠不能包含超過 255 個位元組。"
736760

737761
#: ../../library/struct.rst:339
738762
msgid ""

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy