1
1
# SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) 2001-2024 , Python Software Foundation
2
+ # Copyright (C) 2001-2025 , Python Software Foundation
3
3
# This file is distributed under the same license as the Python package.
4
4
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
#
@@ -11,7 +11,7 @@ msgid ""
11
11
msgstr ""
12
12
"Project-Id-Version : Python 3.12\n "
13
13
"Report-Msgid-Bugs-To : \n "
14
- "POT-Creation-Date : 2024-11-01 14:52 +0000\n "
14
+ "POT-Creation-Date : 2025-03-21 14:55 +0000\n "
15
15
"PO-Revision-Date : 2024-05-11 00:32+0000\n "
16
16
"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2024\n "
17
17
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -505,16 +505,16 @@ msgid ""
505
505
"If negative, the absolute value specifies how much space instances of the "
506
506
"class need *in addition* to the superclass. Use "
507
507
":c:func:`PyObject_GetTypeData` to get a pointer to subclass-specific memory "
508
- "reserved this way."
508
+ "reserved this way. For negative :c:member:`!basicsize`, Python will insert "
509
+ "padding when needed to meet :c:member:`~PyTypeObject.tp_basicsize`'s "
510
+ "alignment requirements."
509
511
msgstr ""
510
- "如果为负数,则以其绝对值指定该类的实例在超类的 *基础之上* 还需要多少空间。 使用 :c:func:`PyObject_GetTypeData` "
511
- "来获取通过此方式保留的子类专属内存的指针。"
512
512
513
- #: ../../c-api/type.rst:403
513
+ #: ../../c-api/type.rst:406
514
514
msgid "Previously, this field could not be negative."
515
515
msgstr "在之前版本中,此字段不能为负数。"
516
516
517
- #: ../../c-api/type.rst:407
517
+ #: ../../c-api/type.rst:410
518
518
msgid ""
519
519
"Size of one element of a variable-size type, in bytes. Used to set "
520
520
":c:member:`PyTypeObject.tp_itemsize`. See ``tp_itemsize`` documentation for "
@@ -523,7 +523,7 @@ msgstr ""
523
523
"可变大小类型中一个元素的大小,以字节为单位。 用于设置 :c:member:`PyTypeObject.tp_itemsize`。 注意事项请参阅 "
524
524
"``tp_itemsize`` 文档。"
525
525
526
- #: ../../c-api/type.rst:411
526
+ #: ../../c-api/type.rst:414
527
527
msgid ""
528
528
"If zero, :c:member:`~PyTypeObject.tp_itemsize` is inherited. Extending "
529
529
"arbitrary variable-sized classes is dangerous, since some types use a fixed "
@@ -535,60 +535,60 @@ msgstr ""
535
535
"扩展任意可变大小的类是很危险的,因为某些类型使用固定偏移量来标识可变大小的内存,这样就会与子类使用的固定大小的内存相重叠。 "
536
536
"为了防止出错,只有在以下情况下才可以继承 ``itemsize``:"
537
537
538
- #: ../../c-api/type.rst:418
538
+ #: ../../c-api/type.rst:421
539
539
msgid ""
540
540
"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize`)."
541
541
msgstr "基类不是可变大小的 (即其 :c:member:`~PyTypeObject.tp_itemsize`)。"
542
542
543
- #: ../../c-api/type.rst:420
543
+ #: ../../c-api/type.rst:423
544
544
msgid ""
545
545
"The requested :c:member:`PyType_Spec.basicsize` is positive, suggesting that"
546
546
" the memory layout of the base class is known."
547
547
msgstr "所请求的 :c:member:`PyType_Spec.basicsize` 为正值,表明基类的内存布局是已知的。"
548
548
549
- #: ../../c-api/type.rst:422
549
+ #: ../../c-api/type.rst:425
550
550
msgid ""
551
551
"The requested :c:member:`PyType_Spec.basicsize` is zero, suggesting that the"
552
552
" subclass does not access the instance's memory directly."
553
553
msgstr "所请求的 :c:member:`PyType_Spec.basicsize` 为零,表明子类不会直接访问实例的内存。"
554
554
555
- #: ../../c-api/type.rst:425
555
+ #: ../../c-api/type.rst:428
556
556
msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag."
557
557
msgstr "具有 :c:macro:`Py_TPFLAGS_ITEMS_AT_END` 旗标。"
558
558
559
- #: ../../c-api/type.rst:429
559
+ #: ../../c-api/type.rst:432
560
560
msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`."
561
561
msgstr "类型旗标,用来设置 :c:member:`PyTypeObject.tp_flags`。"
562
562
563
- #: ../../c-api/type.rst:431
563
+ #: ../../c-api/type.rst:434
564
564
msgid ""
565
565
"If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, "
566
566
":c:func:`PyType_FromSpecWithBases` sets it automatically."
567
567
msgstr ""
568
568
"如果未设置 ``Py_TPFLAGS_HEAPTYPE`` 旗标,则 :c:func:`PyType_FromSpecWithBases` "
569
569
"会自动设置它。"
570
570
571
- #: ../../c-api/type.rst:436
571
+ #: ../../c-api/type.rst:439
572
572
msgid ""
573
573
"Array of :c:type:`PyType_Slot` structures. Terminated by the special slot "
574
574
"value ``{0, NULL}``."
575
575
msgstr ":c:type:`PyType_Slot` 结构体的数组。 以特殊槽位值 ``{0, NULL}`` 来结束。"
576
576
577
- #: ../../c-api/type.rst:439
577
+ #: ../../c-api/type.rst:442
578
578
msgid "Each slot ID should be specified at most once."
579
579
msgstr "每个槽位 ID 应当只被指定一次。"
580
580
581
- #: ../../c-api/type.rst:449
581
+ #: ../../c-api/type.rst:452
582
582
msgid ""
583
583
"Structure defining optional functionality of a type, containing a slot ID "
584
584
"and a value pointer."
585
585
msgstr "定义一个类型的可选功能的结构体,包含一个槽位 ID 和一个值指针。"
586
586
587
- #: ../../c-api/type.rst:454
587
+ #: ../../c-api/type.rst:457
588
588
msgid "A slot ID."
589
589
msgstr "槽位 ID。"
590
590
591
- #: ../../c-api/type.rst:456
591
+ #: ../../c-api/type.rst:459
592
592
msgid ""
593
593
"Slot IDs are named like the field names of the structures "
594
594
":c:type:`PyTypeObject`, :c:type:`PyNumberMethods`, "
@@ -599,48 +599,48 @@ msgstr ""
599
599
":c:type:`PySequenceMethods`, :c:type:`PyMappingMethods` 和 "
600
600
":c:type:`PyAsyncMethods` 的字段名附加一个 ``Py_`` 前缀。 举例来说,使用:"
601
601
602
- #: ../../c-api/type.rst:462
602
+ #: ../../c-api/type.rst:465
603
603
msgid "``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc`"
604
604
msgstr "``Py_tp_dealloc`` 设置 :c:member:`PyTypeObject.tp_dealloc`"
605
605
606
- #: ../../c-api/type.rst:463
606
+ #: ../../c-api/type.rst:466
607
607
msgid "``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`"
608
608
msgstr "``Py_nb_add`` 设置 :c:member:`PyNumberMethods.nb_add`"
609
609
610
- #: ../../c-api/type.rst:464
610
+ #: ../../c-api/type.rst:467
611
611
msgid "``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`"
612
612
msgstr "``Py_sq_length`` 设置 :c:member:`PySequenceMethods.sq_length`"
613
613
614
- #: ../../c-api/type.rst:466
614
+ #: ../../c-api/type.rst:469
615
615
msgid ""
616
616
"The following “offset” fields cannot be set using :c:type:`PyType_Slot`:"
617
617
msgstr "下列 “offset” 字段不可使用 :c:type:`PyType_Slot` 来设置:"
618
618
619
- #: ../../c-api/type.rst:468
619
+ #: ../../c-api/type.rst:471
620
620
msgid ""
621
621
":c:member:`~PyTypeObject.tp_weaklistoffset` (use "
622
622
":c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)"
623
623
msgstr ""
624
624
":c:member:`~PyTypeObject.tp_weaklistoffset` (如果可能请改用 "
625
625
":c:macro:`Py_TPFLAGS_MANAGED_WEAKREF`)"
626
626
627
- #: ../../c-api/type.rst:470
627
+ #: ../../c-api/type.rst:473
628
628
msgid ""
629
629
":c:member:`~PyTypeObject.tp_dictoffset` (use "
630
630
":c:macro:`Py_TPFLAGS_MANAGED_DICT` instead if possible)"
631
631
msgstr ""
632
632
":c:member:`~PyTypeObject.tp_dictoffset` (如果可能请改用 "
633
633
":c:macro:`Py_TPFLAGS_MANAGED_DICT`)"
634
634
635
- #: ../../c-api/type.rst:472
635
+ #: ../../c-api/type.rst:475
636
636
msgid ""
637
637
":c:member:`~PyTypeObject.tp_vectorcall_offset` (use "
638
638
"``\" __vectorcalloffset__\" `` in :ref:`PyMemberDef <pymemberdef-offsets>`)"
639
639
msgstr ""
640
640
":c:member:`~PyTypeObject.tp_vectorcall_offset` (请使用 :ref:`PyMemberDef "
641
641
"<pymemberdef-offsets>` 中的 ``\" __vectorcalloffset__\" ``)"
642
642
643
- #: ../../c-api/type.rst:476
643
+ #: ../../c-api/type.rst:479
644
644
msgid ""
645
645
"If it is not possible to switch to a ``MANAGED`` flag (for example, for "
646
646
"vectorcall or to support Python older than 3.12), specify the offset in "
@@ -651,19 +651,19 @@ msgstr ""
651
651
":c:member:`Py_tp_members <PyTypeObject.tp_members>` 中指定 offset。 详情参见 "
652
652
":ref:`PyMemberDef documentation <pymemberdef-offsets>`。"
653
653
654
- #: ../../c-api/type.rst:482
654
+ #: ../../c-api/type.rst:485
655
655
msgid "The following fields cannot be set at all when creating a heap type:"
656
656
msgstr "以下字段在创建堆类型时完全不可设置:"
657
657
658
- #: ../../c-api/type.rst:484
658
+ #: ../../c-api/type.rst:487
659
659
msgid ""
660
660
":c:member:`~PyTypeObject.tp_vectorcall` (use "
661
661
":c:member:`~PyTypeObject.tp_new` and/or :c:member:`~PyTypeObject.tp_init`)"
662
662
msgstr ""
663
663
":c:member:`~PyTypeObject.tp_vectorcall` (请使用 "
664
664
":c:member:`~PyTypeObject.tp_new` 和/或 :c:member:`~PyTypeObject.tp_init`)"
665
665
666
- #: ../../c-api/type.rst:488
666
+ #: ../../c-api/type.rst:491
667
667
msgid ""
668
668
"Internal fields: :c:member:`~PyTypeObject.tp_dict`, "
669
669
":c:member:`~PyTypeObject.tp_mro`, :c:member:`~PyTypeObject.tp_cache`, "
@@ -674,7 +674,7 @@ msgstr ""
674
674
":c:member:`~PyTypeObject.tp_cache`, :c:member:`~PyTypeObject.tp_subclasses` "
675
675
"和 :c:member:`~PyTypeObject.tp_weaklist`。"
676
676
677
- #: ../../c-api/type.rst:495
677
+ #: ../../c-api/type.rst:498
678
678
msgid ""
679
679
"Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be problematic on "
680
680
"some platforms. To avoid issues, use the *bases* argument of "
@@ -683,11 +683,11 @@ msgstr ""
683
683
"在某些平台上设置 :c:data:`Py_tp_bases` 或 :c:data:`Py_tp_base` 可能会有问题。 为了避免问题,请改用 "
684
684
":c:func:`PyType_FromSpecWithBases` 的 *bases* 参数。"
685
685
686
- #: ../../c-api/type.rst:502
686
+ #: ../../c-api/type.rst:503
687
687
msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API."
688
688
msgstr ":c:type:`PyBufferProcs` 中的槽位可能会在不受限 API 中被设置。"
689
689
690
- #: ../../c-api/type.rst:504
690
+ #: ../../c-api/type.rst:506
691
691
msgid ""
692
692
":c:member:`~PyBufferProcs.bf_getbuffer` and "
693
693
":c:member:`~PyBufferProcs.bf_releasebuffer` are now available under the "
@@ -697,13 +697,13 @@ msgstr ""
697
697
":c:member:`~PyBufferProcs.bf_releasebuffer` 将在 :ref:`受限 API <limited-c-api>`"
698
698
" 中可用。"
699
699
700
- #: ../../c-api/type.rst:511
700
+ #: ../../c-api/type.rst:513
701
701
msgid ""
702
702
"The desired value of the slot. In most cases, this is a pointer to a "
703
703
"function."
704
704
msgstr "该槽位的预期值。 在大多数情况下,这将是一个指向函数的指针。"
705
705
706
- #: ../../c-api/type.rst:514
706
+ #: ../../c-api/type.rst:516
707
707
msgid "Slots other than ``Py_tp_doc`` may not be ``NULL``."
708
708
msgstr "``Py_tp_doc`` 以外的槽位均不可为 ``NULL``。"
709
709
0 commit comments