Skip to content

Commit

Permalink
Get changes from CPython Doc for 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
python-docs-turkish committed Sep 1, 2024
1 parent 3a1f460 commit 938b33e
Show file tree
Hide file tree
Showing 335 changed files with 67,200 additions and 3,711 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# test build, we're building with the .rst files that generated our
# .po files.

CPYTHON_CURRENT_COMMIT := 5df322e91a40909e6904bbdbc0c3a6b6a9eead39
CPYTHON_CURRENT_COMMIT := 4eaf4891c12589e3c7bdad5f5b076e4c8392dd06
LANGUAGE := tr
BRANCH := 3.12

Expand Down
26 changes: 25 additions & 1 deletion c-api/arg.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-01 00:19+0000\n"
"POT-Creation-Date: 2024-09-01 00:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: \n"
"Language-Team: TURKISH <[email protected]>\n"
Expand Down Expand Up @@ -602,6 +602,10 @@ msgid ""
"*converter* function in turn is called as follows::"
msgstr ""

#: c-api/arg.rst:316
msgid "status = converter(object, address);"
msgstr ""

#: c-api/arg.rst:318
msgid ""
"where *object* is the Python object to be converted and *address* is the :c:"
Expand Down Expand Up @@ -818,12 +822,32 @@ msgid ""
"the :mod:`!_weakref` helper module for weak references::"
msgstr ""

#: c-api/arg.rst:477
msgid ""
"static PyObject *\n"
"weakref_ref(PyObject *self, PyObject *args)\n"
"{\n"
" PyObject *object;\n"
" PyObject *callback = NULL;\n"
" PyObject *result = NULL;\n"
"\n"
" if (PyArg_UnpackTuple(args, \"ref\", 1, 2, &object, &callback)) {\n"
" result = PyWeakref_NewRef(object, callback);\n"
" }\n"
" return result;\n"
"}"
msgstr ""

#: c-api/arg.rst:490
msgid ""
"The call to :c:func:`PyArg_UnpackTuple` in this example is entirely "
"equivalent to this call to :c:func:`PyArg_ParseTuple`::"
msgstr ""

#: c-api/arg.rst:493
msgid "PyArg_ParseTuple(args, \"O|O:ref\", &object, &callback)"
msgstr ""

#: c-api/arg.rst:498
msgid "Building values"
msgstr ""
Expand Down
54 changes: 53 additions & 1 deletion c-api/buffer.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-01 00:16+0000\n"
"POT-Creation-Date: 2024-09-01 00:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: \n"
"Language-Team: TURKISH <[email protected]>\n"
Expand Down Expand Up @@ -512,13 +512,49 @@ msgid ""
"dimensional array as follows:"
msgstr ""

#: c-api/buffer.rst:368
msgid ""
"ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * "
"strides[n-1];\n"
"item = *((typeof(item) *)ptr);"
msgstr ""

#: c-api/buffer.rst:374
msgid ""
"As noted above, :c:member:`~Py_buffer.buf` can point to any location within "
"the actual memory block. An exporter can check the validity of a buffer with "
"this function:"
msgstr ""

#: c-api/buffer.rst:378
msgid ""
"def verify_structure(memlen, itemsize, ndim, shape, strides, offset):\n"
" \"\"\"Verify that the parameters represent a valid array within\n"
" the bounds of the allocated memory:\n"
" char *mem: start of the physical memory block\n"
" memlen: length of the physical memory block\n"
" offset: (char *)buf - mem\n"
" \"\"\"\n"
" if offset % itemsize:\n"
" return False\n"
" if offset < 0 or offset+itemsize > memlen:\n"
" return False\n"
" if any(v % itemsize for v in strides):\n"
" return False\n"
"\n"
" if ndim <= 0:\n"
" return ndim == 0 and not shape and not strides\n"
" if 0 in shape:\n"
" return True\n"
"\n"
" imin = sum(strides[j]*(shape[j]-1) for j in range(ndim)\n"
" if strides[j] <= 0)\n"
" imax = sum(strides[j]*(shape[j]-1) for j in range(ndim)\n"
" if strides[j] > 0)\n"
"\n"
" return 0 <= offset+imin and offset+imax+itemsize <= memlen"
msgstr ""

#: c-api/buffer.rst:408
msgid "PIL-style: shape, strides and suboffsets"
msgstr ""
Expand All @@ -541,6 +577,22 @@ msgid ""
"strides and suboffsets::"
msgstr ""

#: c-api/buffer.rst:423
msgid ""
"void *get_item_pointer(int ndim, void *buf, Py_ssize_t *strides,\n"
" Py_ssize_t *suboffsets, Py_ssize_t *indices) {\n"
" char *pointer = (char*)buf;\n"
" int i;\n"
" for (i = 0; i < ndim; i++) {\n"
" pointer += strides[i] * indices[i];\n"
" if (suboffsets[i] >=0 ) {\n"
" pointer = *((char**)pointer) + suboffsets[i];\n"
" }\n"
" }\n"
" return (void*)pointer;\n"
"}"
msgstr ""

#: c-api/buffer.rst:438
msgid "Buffer-related functions"
msgstr ""
Expand Down
28 changes: 15 additions & 13 deletions c-api/bytearray.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-18 19:05+0000\n"
"POT-Creation-Date: 2024-09-01 00:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: \n"
"Language-Team: TURKISH <[email protected]>\n"
Expand Down Expand Up @@ -57,44 +57,46 @@ msgid ""
"`buffer protocol <bufferobjects>`."
msgstr ""

#: c-api/bytearray.rst:48
msgid ""
"Create a new bytearray object from *string* and its length, *len*. On "
"failure, ``NULL`` is returned."
#: c-api/bytearray.rst:52 c-api/bytearray.rst:59
msgid "On failure, return ``NULL`` with an exception set."
msgstr ""

#: c-api/bytearray.rst:50
msgid "Create a new bytearray object from *string* and its length, *len*."
msgstr ""

#: c-api/bytearray.rst:54
#: c-api/bytearray.rst:57
msgid ""
"Concat bytearrays *a* and *b* and return a new bytearray with the result."
msgstr ""

#: c-api/bytearray.rst:59
#: c-api/bytearray.rst:64
msgid "Return the size of *bytearray* after checking for a ``NULL`` pointer."
msgstr ""

#: c-api/bytearray.rst:64
#: c-api/bytearray.rst:69
msgid ""
"Return the contents of *bytearray* as a char array after checking for a "
"``NULL`` pointer. The returned array always has an extra null byte appended."
msgstr ""

#: c-api/bytearray.rst:71
#: c-api/bytearray.rst:76
msgid "Resize the internal buffer of *bytearray* to *len*."
msgstr ""

#: c-api/bytearray.rst:74
#: c-api/bytearray.rst:79
msgid "Macros"
msgstr ""

#: c-api/bytearray.rst:76
#: c-api/bytearray.rst:81
msgid "These macros trade safety for speed and they don't check pointers."
msgstr ""

#: c-api/bytearray.rst:80
#: c-api/bytearray.rst:85
msgid "Similar to :c:func:`PyByteArray_AsString`, but without error checking."
msgstr ""

#: c-api/bytearray.rst:85
#: c-api/bytearray.rst:90
msgid "Similar to :c:func:`PyByteArray_Size`, but without error checking."
msgstr ""

Expand Down
11 changes: 10 additions & 1 deletion c-api/call.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-01 21:53+0000\n"
"POT-Creation-Date: 2024-09-01 00:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: \n"
"Language-Team: TURKISH <[email protected]>\n"
Expand Down Expand Up @@ -35,6 +35,11 @@ msgid ""
"callable. The signature of the slot is::"
msgstr ""

#: c-api/call.rst:17
msgid ""
"PyObject *tp_call(PyObject *callable, PyObject *args, PyObject *kwargs);"
msgstr ""

#: c-api/call.rst:19
msgid ""
"A call is made using a tuple for the positional arguments and a dict for the "
Expand Down Expand Up @@ -215,6 +220,10 @@ msgid ""
"Currently equivalent to::"
msgstr ""

#: c-api/call.rst:153
msgid "(Py_ssize_t)(nargsf & ~PY_VECTORCALL_ARGUMENTS_OFFSET)"
msgstr ""

#: c-api/call.rst:155
msgid ""
"However, the function ``PyVectorcall_NARGS`` should be used to allow for "
Expand Down
6 changes: 5 additions & 1 deletion c-api/capsule.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-18 19:05+0000\n"
"POT-Creation-Date: 2024-09-01 00:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: \n"
"Language-Team: TURKISH <[email protected]>\n"
Expand Down Expand Up @@ -39,6 +39,10 @@ msgstr ""
msgid "The type of a destructor callback for a capsule. Defined as::"
msgstr ""

#: c-api/capsule.rst:29
msgid "typedef void (*PyCapsule_Destructor)(PyObject *);"
msgstr ""

#: c-api/capsule.rst:31
msgid ""
"See :c:func:`PyCapsule_New` for the semantics of PyCapsule_Destructor "
Expand Down
10 changes: 9 additions & 1 deletion c-api/complex.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-01 00:19+0000\n"
"POT-Creation-Date: 2024-09-01 00:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: \n"
"Language-Team: TURKISH <[email protected]>\n"
Expand Down Expand Up @@ -51,6 +51,14 @@ msgstr ""
msgid "The structure is defined as::"
msgstr ""

#: c-api/complex.rst:35
msgid ""
"typedef struct {\n"
" double real;\n"
" double imag;\n"
"} Py_complex;"
msgstr ""

#: c-api/complex.rst:43
msgid ""
"Return the sum of two complex numbers, using the C :c:type:`Py_complex` "
Expand Down
11 changes: 10 additions & 1 deletion c-api/contextvars.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-01 00:17+0000\n"
"POT-Creation-Date: 2024-09-01 00:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: \n"
"Language-Team: TURKISH <[email protected]>\n"
Expand All @@ -27,6 +27,15 @@ msgid ""
"`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::"
msgstr ""

#: c-api/contextvars.rst:20
msgid ""
"// in 3.7.0:\n"
"PyContext *PyContext_New(void);\n"
"\n"
"// in 3.7.1+:\n"
"PyObject *PyContext_New(void);"
msgstr ""

#: c-api/contextvars.rst:26
msgid "See :issue:`34762` for more details."
msgstr ""
Expand Down
42 changes: 41 additions & 1 deletion c-api/dict.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-18 22:33+0300\n"
"POT-Creation-Date: 2024-09-01 00:21+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: \n"
"Language-Team: TURKISH <[email protected]>\n"
Expand Down Expand Up @@ -190,13 +190,45 @@ msgstr ""
msgid "For example::"
msgstr ""

#: c-api/dict.rst:181
msgid ""
"PyObject *key, *value;\n"
"Py_ssize_t pos = 0;\n"
"\n"
"while (PyDict_Next(self->dict, &pos, &key, &value)) {\n"
" /* do something interesting with the values... */\n"
" ...\n"
"}"
msgstr ""

#: c-api/dict.rst:189
msgid ""
"The dictionary *p* should not be mutated during iteration. It is safe to "
"modify the values of the keys as you iterate over the dictionary, but only "
"so long as the set of keys does not change. For example::"
msgstr ""

#: c-api/dict.rst:193
msgid ""
"PyObject *key, *value;\n"
"Py_ssize_t pos = 0;\n"
"\n"
"while (PyDict_Next(self->dict, &pos, &key, &value)) {\n"
" long i = PyLong_AsLong(value);\n"
" if (i == -1 && PyErr_Occurred()) {\n"
" return -1;\n"
" }\n"
" PyObject *o = PyLong_FromLong(i + 1);\n"
" if (o == NULL)\n"
" return -1;\n"
" if (PyDict_SetItem(self->dict, key, o) < 0) {\n"
" Py_DECREF(o);\n"
" return -1;\n"
" }\n"
" Py_DECREF(o);\n"
"}"
msgstr ""

#: c-api/dict.rst:214
msgid ""
"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
Expand Down Expand Up @@ -225,6 +257,14 @@ msgid ""
"if an exception was raised. Equivalent Python (except for the return value)::"
msgstr ""

#: c-api/dict.rst:240
msgid ""
"def PyDict_MergeFromSeq2(a, seq2, override):\n"
" for key, value in seq2:\n"
" if override or key not in a:\n"
" a[key] = value"
msgstr ""

#: c-api/dict.rst:247
msgid ""
"Register *callback* as a dictionary watcher. Return a non-negative integer "
Expand Down
Loading

0 comments on commit 938b33e

Please sign in to comment.