[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/python/python-docs-pl/friendly-traceback/c-api/object.po [Back]  [Original]

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR , YEAR.
#
# Translators:
# python-doc bot, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-08-21 14:26+0000\n"
"PO-Revision-Date: 2025-09-16 00:00+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: Polish (https://app.transifex.com/python-doc/teams/5390/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10=0 && n%10=5 && "
"n%10=12 && n%100 0) {\n"
"   Py_INCREF(op);\n"
"   return 1;\n"
"}\n"
"return 0;"
msgstr ""

msgid ""
"This is intended as a building block for managing weak references without "
"the overhead of a Python :ref:`weak reference object `."
msgstr ""

msgid ""
"Typically, correct use of this function requires support from *obj*'s "
"deallocator (:c:member:`~PyTypeObject.tp_dealloc`). For example, the "
"following sketch could be adapted to implement a \"weakmap\" that works like "
"a :py:class:`~weakref.WeakValueDictionary` for a specific type:"
msgstr ""

msgid ""
"PyMutex mutex;\n"
"\n"
"PyObject *\n"
"add_entry(weakmap_key_type *key, PyObject *value)\n"
"{\n"
"    PyUnstable_EnableTryIncRef(value);\n"
"    weakmap_type weakmap = ...;\n"
"    PyMutex_Lock(&mutex);\n"
"    weakmap_add_entry(weakmap, key, value);\n"
"    PyMutex_Unlock(&mutex);\n"
"    Py_RETURN_NONE;\n"
"}\n"
"\n"
"PyObject *\n"
"get_value(weakmap_key_type *key)\n"
"{\n"
"    weakmap_type weakmap = ...;\n"
"    PyMutex_Lock(&mutex);\n"
"    PyObject *result = weakmap_find(weakmap, key);\n"
"    if (PyUnstable_TryIncRef(result)) {\n"
"        // `result` is safe to use\n"
"        PyMutex_Unlock(&mutex);\n"
"        return result;\n"
"    }\n"
"    // if we get here, `result` is starting to be garbage-collected,\n"
"    // but has not been removed from the weakmap yet\n"
"    PyMutex_Unlock(&mutex);\n"
"    return NULL;\n"
"}\n"
"\n"
"// tp_dealloc function for weakmap values\n"
"void\n"
"value_dealloc(PyObject *value)\n"
"{\n"
"    weakmap_type weakmap = ...;\n"
"    PyMutex_Lock(&mutex);\n"
"    weakmap_remove_value(weakmap, value);\n"
"\n"
"    ...\n"
"    PyMutex_Unlock(&mutex);\n"
"}"
msgstr ""

msgid ""
"Enables subsequent uses of :c:func:`PyUnstable_TryIncRef` on *obj*.  The "
"caller must hold a :term:`strong reference` to *obj* when calling this."
msgstr ""

msgid "Determine if *op* only has one reference."
msgstr ""

msgid ""
"On GIL-enabled builds, this function is equivalent to :c:expr:`Py_REFCNT(op) "
"== 1`."
msgstr ""

msgid ""
"On a :term:`free-threaded build`, this checks if *op*'s :term:`reference "
"count` is equal to one and additionally checks if *op* is only used by this "
"thread. :c:expr:`Py_REFCNT(op) == 1` is **not** thread-safe on free-threaded "
"builds; prefer this function."
msgstr ""

msgid ""
"The caller must hold an :term:`attached thread state`, despite the fact that "
"this function doesn't call into the Python interpreter. This function cannot "
"fail."
msgstr ""

msgid ""
"Marks the object *op* :term:`immortal`. The argument should be uniquely "
"referenced by the calling thread. This is intended to be used for reducing "
"reference counting contention in the :term:`free-threaded build` for objects "
"which are shared across threads."
msgstr ""

msgid ""
"This is a one-way process: objects can only be made immortal; they cannot be "
"made mortal once again. Immortal objects do not participate in reference "
"counting and will never be garbage collected. If the object is GC-tracked, "
"it is untracked."
msgstr ""

msgid ""
"This function is intended to be used soon after *op* is created, by the code "
"that creates it, such as in the object's :c:member:`~PyTypeObject.tp_new` "
"slot. Returns 1 if the object was made immortal and returns 0 if it was not. "
"This function cannot fail."
msgstr ""

msgid "built-in function"
msgstr "funkcja wbudowana"

msgid "repr"
msgstr ""

msgid "ascii"
msgstr "ascii"

msgid "string"
msgstr "cig znakw"

msgid "PyObject_Str (C function)"
msgstr ""

msgid "bytes"
msgstr ""

msgid "hash"
msgstr ""

msgid "type"
msgstr "typ"

msgid "len"
msgstr "len"

Web Proxy Viewer  |  New URL  |  Original Page