88msgstr ""
99"Project-Id-Version : Python 3.14\n "
1010"Report-Msgid-Bugs-To : \n "
11- "POT-Creation-Date : 2025-05-16 14:19 +0000\n "
11+ "POT-Creation-Date : 2025-05-23 14:20 +0000\n "
1212"PO-Revision-Date : 2021-06-28 00:47+0000\n "
1313"Language-Team : German (https://app.transifex.com/python-doc/teams/5390/de/)\n "
1414"MIME-Version : 1.0\n "
@@ -23,7 +23,22 @@ msgstr ""
2323msgid ""
2424"Initialize a newly allocated object *op* with its type and initial "
2525"reference. Returns the initialized object. Other fields of the object are "
26- "not affected."
26+ "not initialized. Despite its name, this function is unrelated to the "
27+ "object's :meth:`~object.__init__` method (:c:member:`~PyTypeObject.tp_init` "
28+ "slot). Specifically, this function does **not** call the object's :meth:`!"
29+ "__init__` method."
30+ msgstr ""
31+
32+ msgid ""
33+ "In general, consider this function to be a low-level routine. Use :c:member:"
34+ "`~PyTypeObject.tp_alloc` where possible. For implementing :c:member:`!"
35+ "tp_alloc` for your type, prefer :c:func:`PyType_GenericAlloc` or :c:func:"
36+ "`PyObject_New`."
37+ msgstr ""
38+
39+ msgid ""
40+ "This function only initializes the object's memory corresponding to the "
41+ "initial :c:type:`PyObject` structure. It does not zero the rest."
2742msgstr ""
2843
2944msgid ""
@@ -32,36 +47,106 @@ msgid ""
3247msgstr ""
3348
3449msgid ""
35- "Allocate a new Python object using the C structure type *TYPE* and the "
36- "Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
37- "Python object header are not initialized. The caller will own the only "
38- "reference to the object (i.e. its reference count will be one). The size of "
39- "the memory allocation is determined from the :c:member:`~PyTypeObject."
40- "tp_basicsize` field of the type object."
50+ "This function only initializes some of the object's memory. It does not "
51+ "zero the rest."
52+ msgstr ""
53+
54+ msgid ""
55+ "Allocates a new Python object using the C structure type *TYPE* and the "
56+ "Python type object *typeobj* (``PyTypeObject*``) by calling :c:func:"
57+ "`PyObject_Malloc` to allocate memory and initializing it like :c:func:"
58+ "`PyObject_Init`. The caller will own the only reference to the object (i.e. "
59+ "its reference count will be one)."
60+ msgstr ""
61+
62+ msgid ""
63+ "Avoid calling this directly to allocate memory for an object; call the "
64+ "type's :c:member:`~PyTypeObject.tp_alloc` slot instead."
65+ msgstr ""
66+
67+ msgid ""
68+ "When populating a type's :c:member:`~PyTypeObject.tp_alloc` slot, :c:func:"
69+ "`PyType_GenericAlloc` is preferred over a custom function that simply calls "
70+ "this macro."
71+ msgstr ""
72+
73+ msgid ""
74+ "This macro does not call :c:member:`~PyTypeObject.tp_alloc`, :c:member:"
75+ "`~PyTypeObject.tp_new` (:meth:`~object.__new__`), or :c:member:"
76+ "`~PyTypeObject.tp_init` (:meth:`~object.__init__`)."
77+ msgstr ""
78+
79+ msgid ""
80+ "This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:"
81+ "member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_New` instead."
82+ msgstr ""
83+
84+ msgid ""
85+ "Memory allocated by this macro must be freed with :c:func:`PyObject_Free` "
86+ "(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)."
87+ msgstr ""
88+
89+ msgid ""
90+ "The returned memory is not guaranteed to have been completely zeroed before "
91+ "it was initialized."
92+ msgstr ""
93+
94+ msgid ""
95+ "This macro does not construct a fully initialized object of the given type; "
96+ "it merely allocates memory and prepares it for further initialization by :c:"
97+ "member:`~PyTypeObject.tp_init`. To construct a fully initialized object, "
98+ "call *typeobj* instead. For example::"
99+ msgstr ""
100+
101+ msgid "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);"
102+ msgstr ""
103+
104+ msgid ":c:func:`PyObject_Free`"
105+ msgstr ""
106+
107+ msgid ":c:macro:`PyObject_GC_New`"
108+ msgstr ""
109+
110+ msgid ":c:func:`PyType_GenericAlloc`"
111+ msgstr ""
112+
113+ msgid ":c:member:`~PyTypeObject.tp_alloc`"
114+ msgstr ""
115+
116+ msgid "Like :c:macro:`PyObject_New` except:"
117+ msgstr ""
118+
119+ msgid ""
120+ "It allocates enough memory for the *TYPE* structure plus *size* "
121+ "(``Py_ssize_t``) fields of the size given by the :c:member:`~PyTypeObject."
122+ "tp_itemsize` field of *typeobj*."
123+ msgstr ""
124+
125+ msgid "The memory is initialized like :c:func:`PyObject_InitVar`."
126+ msgstr ""
127+
128+ msgid ""
129+ "This is useful for implementing objects like tuples, which are able to "
130+ "determine their size at construction time. Embedding the array of fields "
131+ "into the same allocation decreases the number of allocations, improving the "
132+ "memory management efficiency."
41133msgstr ""
42134
43135msgid ""
44- "Note that this function is unsuitable if *typeobj* has :c:macro:"
45- "`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_New` "
46- "instead."
136+ "This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:"
137+ "member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_NewVar` instead."
47138msgstr ""
48139
49140msgid ""
50- "Allocate a new Python object using the C structure type *TYPE* and the "
51- "Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
52- "Python object header are not initialized. The allocated memory allows for "
53- "the *TYPE* structure plus *size* (``Py_ssize_t``) fields of the size given "
54- "by the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*. This is "
55- "useful for implementing objects like tuples, which are able to determine "
56- "their size at construction time. Embedding the array of fields into the "
57- "same allocation decreases the number of allocations, improving the memory "
58- "management efficiency."
141+ "Memory allocated by this function must be freed with :c:func:`PyObject_Free` "
142+ "(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)."
59143msgstr ""
60144
61145msgid ""
62- "Note that this function is unsuitable if *typeobj* has :c:macro:"
63- "`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_NewVar` "
64- "instead."
146+ "PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);"
147+ msgstr ""
148+
149+ msgid ":c:macro:`PyObject_GC_NewVar`"
65150msgstr ""
66151
67152msgid "Same as :c:func:`PyObject_Free`."
0 commit comments