@@ -12,7 +12,7 @@ msgid ""
1212msgstr ""
1313"Project-Id-Version :Python 3.13\n "
1414"Report-Msgid-Bugs-To :\n "
15- "POT-Creation-Date :2025-11-19 20:20 +0000\n "
15+ "POT-Creation-Date :2025-11-29 15:01 +0000\n "
1616"PO-Revision-Date :2025-09-15 01:04+0000\n "
1717"Last-Translator :Freesand Leo <yuqinju@163.com>, 2025\n "
1818"Language-Team :Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -3044,46 +3044,41 @@ msgstr "Decimal 常见问题"
30443044
30453045#: ../../library/decimal.rst:2070
30463046msgid ""
3047- "Q. It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way "
3047+ "Q: It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way "
30483048"to minimize typing when using the interactive interpreter?"
3049- msgstr "Q. 总是输入 ``decimal.Decimal('1234.5')`` 是否过于笨拙。 在使用交互解释器时有没有最小化输入量的方式? "
3049+ msgstr ""
30503050
30513051#: ../../library/decimal.rst:2073
3052- msgid "A. Some users abbreviate the constructor to just a single letter:"
3053- msgstr "A. 有些用户会将构造器简写为一个字母: "
3052+ msgid "A: Some users abbreviate the constructor to just a single letter:"
3053+ msgstr ""
30543054
30553055#: ../../library/decimal.rst:2079
30563056msgid ""
3057- "Q. In a fixed-point application with two decimal places, some inputs have "
3057+ "Q: In a fixed-point application with two decimal places, some inputs have "
30583058"many places and need to be rounded. Others are not supposed to have excess "
30593059"digits and need to be validated. What methods should be used?"
30603060msgstr ""
3061- "Q. 在带有两个十进制位的定点数应用中,有些输入值具有许多位,需要被舍入。 另一些数则不应具有多余位,需要验证有效性。 这种情况应该用什么方法?"
30623061
30633062#: ../../library/decimal.rst:2083
30643063msgid ""
3065- "A. The :meth:`~Decimal.quantize` method rounds to a fixed number of decimal "
3064+ "A: The :meth:`~Decimal.quantize` method rounds to a fixed number of decimal "
30663065"places. If the :const:`Inexact` trap is set, it is also useful for "
30673066"validation:"
30683067msgstr ""
3069- "A. 用 :meth:`~Decimal.quantize` 方法舍入到固定数目的十进制位。 如果设置了 :const:`Inexact` "
3070- "陷阱,它也适用于验证有效性:"
30713068
30723069#: ../../library/decimal.rst:2101
30733070msgid ""
3074- "Q. Once I have valid two place inputs, how do I maintain that invariant "
3071+ "Q: Once I have valid two place inputs, how do I maintain that invariant "
30753072"throughout an application?"
3076- msgstr "Q. 当我使用两个有效位的输入时,我要如何在一个应用中保持有效位不变? "
3073+ msgstr ""
30773074
30783075#: ../../library/decimal.rst:2104
30793076msgid ""
3080- "A. Some operations like addition, subtraction, and multiplication by an "
3077+ "A: Some operations like addition, subtraction, and multiplication by an "
30813078"integer will automatically preserve fixed point. Others operations, like "
30823079"division and non-integer multiplication, will change the number of decimal "
30833080"places and need to be followed-up with a :meth:`~Decimal.quantize` step:"
30843081msgstr ""
3085- "A. 某些运算如与整数相加、相减和相乘将会自动保留固定的小数位数。 其他运算,如相除和非整数相乘则会改变小数位数,需要再加上 "
3086- ":meth:`~Decimal.quantize` 处理步骤:"
30873082
30883083#: ../../library/decimal.rst:2122
30893084msgid ""
@@ -3093,35 +3088,31 @@ msgstr "在开发定点数应用时,更方便的做法是定义处理 :meth:`~
30933088
30943089#: ../../library/decimal.rst:2136
30953090msgid ""
3096- "Q. There are many ways to express the same value. The numbers ``200``, "
3091+ "Q: There are many ways to express the same value. The numbers ``200``, "
30973092"``200.000``, ``2E2``, and ``.02E+4`` all have the same value at various "
30983093"precisions. Is there a way to transform them to a single recognizable "
30993094"canonical value?"
31003095msgstr ""
3101- "Q. 表示同一个值有许多方式。 数字 ``200``, ``200.000``, ``2E2`` 和 ``.02E+4`` 都具有相同的值但其精度不同。"
3102- " 是否有办法将它们转换为一个可识别的规范值?"
31033096
31043097#: ../../library/decimal.rst:2141
31053098msgid ""
3106- "A. The :meth:`~Decimal.normalize` method maps all equivalent values to a "
3099+ "A: The :meth:`~Decimal.normalize` method maps all equivalent values to a "
31073100"single representative:"
3108- msgstr "A. :meth:`~Decimal.normalize` 方法可将所有相等的值映射为单一表示形式: "
3101+ msgstr ""
31093102
31103103#: ../../library/decimal.rst:2148
3111- msgid "Q. When does rounding occur in a computation?"
3112- msgstr "Q. 计算中的舍入是在什么时候发生的? "
3104+ msgid "Q: When does rounding occur in a computation?"
3105+ msgstr ""
31133106
31143107#: ../../library/decimal.rst:2150
31153108msgid ""
3116- "A. It occurs *after* the computation. The philosophy of the decimal "
3109+ "A: It occurs *after* the computation. The philosophy of the decimal "
31173110"specification is that numbers are considered exact and are created "
31183111"independent of the current context. They can even have greater precision "
31193112"than current context. Computations process with those exact inputs and then"
31203113" rounding (or other context operations) is applied to the *result* of the "
31213114"computation::"
31223115msgstr ""
3123- "A. 是在计算 *之后* 发生的。 decimal 设计规范认为数字应当被视为是精确的并且是不依赖于当前上下文而创建的。 "
3124- "它们甚至可以具有比当前上下文更高的精确度。 计算过程将使用精确的输入然后再对计算的 *结果* 应用舍入(或其他的上下文操作)::"
31253116
31263117#: ../../library/decimal.rst:2157
31273118msgid ""
@@ -3149,19 +3140,17 @@ msgstr ""
31493140
31503141#: ../../library/decimal.rst:2168
31513142msgid ""
3152- "Q. Some decimal values always print with exponential notation. Is there a "
3143+ "Q: Some decimal values always print with exponential notation. Is there a "
31533144"way to get a non-exponential representation?"
3154- msgstr "Q. 有些十进制值总是被打印为指数表示形式。 是否有办法得到一个非指数表示形式? "
3145+ msgstr ""
31553146
31563147#: ../../library/decimal.rst:2171
31573148msgid ""
3158- "A. For some values, exponential notation is the only way to express the "
3149+ "A: For some values, exponential notation is the only way to express the "
31593150"number of significant places in the coefficient. For example, expressing "
31603151"``5.0E+3`` as ``5000`` keeps the value constant but cannot show the "
31613152"original's two-place significance."
31623153msgstr ""
3163- "A. 对于某些值来说,指数表示法是表示系数中有效位的唯一方式。 例如,将 ``5.0E+3`` 表示为 ``5000`` "
3164- "可以让值保持恒定但是无法显示原本的两位有效位。"
31653154
31663155#: ../../library/decimal.rst:2176
31673156msgid ""
@@ -3171,15 +3160,15 @@ msgid ""
31713160msgstr "如果一个应用不必关心追踪有效位,则可以很容易地移除指数和末尾的零,丢弃有效位但让值保持不变:"
31723161
31733162#: ../../library/decimal.rst:2186
3174- msgid "Q. Is there a way to convert a regular float to a :class:`Decimal`?"
3175- msgstr "Q. 是否有办法将一个普通浮点数转换为 :class:`Decimal`? "
3163+ msgid "Q: Is there a way to convert a regular float to a :class:`Decimal`?"
3164+ msgstr ""
31763165
31773166#: ../../library/decimal.rst:2188
31783167msgid ""
3179- "A. Yes, any binary floating-point number can be exactly expressed as a "
3168+ "A: Yes, any binary floating-point number can be exactly expressed as a "
31803169"Decimal though an exact conversion may take more precision than intuition "
31813170"would suggest:"
3182- msgstr "A. 是的,任何二进制浮点数都可以精确地表示为 Decimal 值,但完全精确的转换可能需要比平常感觉更高的精度: "
3171+ msgstr ""
31833172
31843173#: ../../library/decimal.rst:2192
31853174msgid ""
@@ -3191,37 +3180,33 @@ msgstr ""
31913180
31923181#: ../../library/decimal.rst:2197
31933182msgid ""
3194- "Q. Within a complex calculation, how can I make sure that I haven't gotten a"
3183+ "Q: Within a complex calculation, how can I make sure that I haven't gotten a"
31953184" spurious result because of insufficient precision or rounding anomalies."
3196- msgstr "Q. 在一个复杂的计算中,我怎样才能保证不会得到由精度不足和舍入异常所导致的虚假结果。 "
3185+ msgstr ""
31973186
31983187#: ../../library/decimal.rst:2200
31993188msgid ""
3200- "A. The decimal module makes it easy to test results. A best practice is to "
3189+ "A: The decimal module makes it easy to test results. A best practice is to "
32013190"re-run calculations using greater precision and with various rounding modes."
32023191" Widely differing results indicate insufficient precision, rounding mode "
32033192"issues, ill-conditioned inputs, or a numerically unstable algorithm."
32043193msgstr ""
3205- "A. 使用 decimal 模块可以很容易地检测结果。 最好的做法是使用更高的精度和不同的舍入模式重新进行计算。 "
3206- "明显不同的结果表明存在精度不足、舍入模式问题、不符合条件的输入或是结果不稳定的算法。"
32073194
32083195#: ../../library/decimal.rst:2205
32093196msgid ""
3210- "Q. I noticed that context precision is applied to the results of operations "
3197+ "Q: I noticed that context precision is applied to the results of operations "
32113198"but not to the inputs. Is there anything to watch out for when mixing "
32123199"values of different precisions?"
3213- msgstr "Q. 我发现上下文精度的应用只针对运算结果而不针对输入。在混合使用不同精度的值时有什么需要注意的吗? "
3200+ msgstr ""
32143201
32153202#: ../../library/decimal.rst:2209
32163203msgid ""
3217- "A. Yes. The principle is that all values are considered to be exact and so "
3204+ "A: Yes. The principle is that all values are considered to be exact and so "
32183205"is the arithmetic on those values. Only the results are rounded. The "
32193206"advantage for inputs is that\" what you type is what you get\" . A "
32203207"disadvantage is that the results can look odd if you forget that the inputs "
32213208"haven't been rounded:"
32223209msgstr ""
3223- "A. 是的。 原则上所有值都会被视为精确值,在这些值上进行的算术运算也是如此。 只有结果会被舍入。 对于输入来说其好处是“所输入即所得”。 "
3224- "而其缺点则是如果你忘记了输入没有被舍入,结果看起来可能会很奇怪:"
32253210
32263211#: ../../library/decimal.rst:2214
32273212msgid ""
@@ -3260,12 +3245,12 @@ msgid ""
32603245msgstr "此外,还可以使用 :meth:`Context.create_decimal` 方法在创建输入时执行舍入:"
32613246
32623247#: ../../library/decimal.rst:2237
3263- msgid "Q. Is the CPython implementation fast for large numbers?"
3264- msgstr "Q. CPython 实现对于巨大数字是否足够快速? "
3248+ msgid "Q: Is the CPython implementation fast for large numbers?"
3249+ msgstr ""
32653250
32663251#: ../../library/decimal.rst:2239
32673252msgid ""
3268- "A. Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of "
3253+ "A: Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of "
32693254"the decimal module integrate the high speed `libmpdec "
32703255"<https://www.bytereef.org/mpdecimal/doc/libmpdec/index.html>`_ library for "
32713256"arbitrary precision correctly rounded decimal floating-point arithmetic "
@@ -3275,12 +3260,6 @@ msgid ""
32753260"<https://en.wikipedia.org/wiki/Discrete_Fourier_transform_(general)#Number-"
32763261"theoretic_transform>`_ for very large numbers."
32773262msgstr ""
3278- "A. 是的。 在 CPython 和 PyPy3 实现中,decimal 模块的 C/CFFI 版本集成了高速 `libmpdec "
3279- "<https://www.bytereef.org/mpdecimal/doc/libmpdec/index.html>`_ "
3280- "库用于实现任意精度正确舍入的十进制浮点算术 [#]_。 ``libmpdec`` 会对中等大小的数字使用 `Karatsuba 乘法 "
3281- "<https://en.wikipedia.org/wiki/Karatsuba_algorithm>`_ 而对非常巨大的数字使用 `数字原理变换 "
3282- "<https://en.wikipedia.org/wiki/Discrete_Fourier_transform_(general)#Number-"
3283- "theoretic_transform>`_。"
32843263
32853264#: ../../library/decimal.rst:2249
32863265msgid ""