11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2023 , Python Software Foundation
2+ # Copyright (C) 2001-2024 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
88# ww song <[email protected] >, 201899# Alpha Du <[email protected] >, 20191010# Freesand Leo <[email protected] >, 202111- # Rafael Fontenelle <[email protected] >, 2023 11+ # Rafael Fontenelle <[email protected] >, 2024 1212#
1313#, fuzzy
1414msgid ""
1515msgstr ""
1616"Project-Id-Version : Python 3.9\n "
1717"Report-Msgid-Bugs-To : \n "
18- "POT-Creation-Date : 2023-08-18 15:39 +0000\n "
18+ "POT-Creation-Date : 2024-02-25 04:14 +0000\n "
1919"PO-Revision-Date : 2018-06-29 21:06+0000\n "
20- "
Last-Translator :
Rafael Fontenelle <[email protected] >, 2023 \n "
20+ "
Last-Translator :
Rafael Fontenelle <[email protected] >, 2024 \n "
2121"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2222"MIME-Version : 1.0\n "
2323"Content-Type : text/plain; charset=UTF-8\n "
@@ -525,8 +525,8 @@ msgid ""
525525":exc:`TypeError`. If values in ``changes`` do not specify fields, raises "
526526":exc:`TypeError`."
527527msgstr ""
528- "创建一个与 ``obj`` 类型相同的新对象,将字段替换为 ``changes`` 里的值。如果 ``obj`` 不是数据类,引发 "
529- ":exc:`TypeError` 。如果 ``changes`` 里的值没有指定要替换的字段名,引发 :exc:`TypeError`。"
528+ "创建一个与 ``obj`` 类型相同的新对象,将字段替换为 ``changes`` 里的值。如果 ``obj`` 不是数据类,则抛出 "
529+ ":exc:`TypeError` 。如果 ``changes`` 里的值没有指定要替换的字段名,则抛出 :exc:`TypeError`。"
530530
531531#: ../../library/dataclasses.rst:383
532532msgid ""
@@ -549,7 +549,8 @@ msgstr ""
549549msgid ""
550550"It is an error for ``changes`` to contain any fields that are defined as "
551551"having ``init=False``. A :exc:`ValueError` will be raised in this case."
552- msgstr "``changes`` 试图为任何定义为 ``init=False`` 的字段赋值,会引发 :exc:`ValueError`。"
552+ msgstr ""
553+ "``changes`` 包含任何定义为 ``init=False`` 的字段是错误的。在这种情况下会引发 :exc:`ValueError` 。"
553554
554555#: ../../library/dataclasses.rst:395
555556msgid ""
@@ -561,10 +562,9 @@ msgid ""
561562"perhaps a custom ``replace()`` (or similarly named) method which handles "
562563"instance copying."
563564msgstr ""
564- "提前提醒 ``init=False`` 字段在 :func:`replace` 被调用时的行为。如果它们被初始化的话,它们不是从源对象复制的,而是在 "
565- ":meth:`__post_init__` 中初始化。除非保持审慎,否则 ``init=False`` "
566- "字段大概很少能被正确地使用。如果使用它们,那么使用另外的类构造器,或自定义 ``replace()`` "
567- "方法(或类似名称的方法)来复制实例,可能是明智的选择。"
565+ "提前提醒, 字段在 :func:`replace` 被调用时的行为是,当它们被初始化时,不是从源对象直接复制,而是在 "
566+ ":meth:`__post_init__` 中初始化。除非保持审慎,否则 ``init=False`` 字段大概很少能被正确地使用。如果有使用 "
567+ "``init=False`` 的字段,那么使用另外的类构造器,或自定义 ``replace()`` 方法(或类似名称的方法)来复制实例,可能会更好。"
568568
569569#: ../../library/dataclasses.rst:406
570570msgid ""
0 commit comments