# 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-10-17 16:44+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<=4) && " "(n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && " "n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" msgid "Bytes Objects" msgstr "" msgid "" "These functions raise :exc:`TypeError` when expecting a bytes parameter and " "called with a non-bytes parameter." msgstr "" msgid "" "The internal buffer of :c:type:`PyBytesObject` always includes an extra " "trailing null byte for compatibility with null terminated C strings. This " "extra byte is not counted in :c:func:`PyBytes_Size` nor in the various " "*length* and *size* arguments of the functions below." msgstr "" msgid "This subtype of :c:type:`PyObject` represents a Python bytes object." msgstr "" msgid "" "This instance of :c:type:`PyTypeObject` represents the Python bytes type; it " "is the same object as :class:`bytes` in the Python layer." msgstr "" msgid "" "Return true if the object *o* is a bytes object or an instance of a subtype " "of the bytes type. This function always succeeds." msgstr "" msgid "" "Return true if the object *o* is a bytes object, but not an instance of a " "subtype of the bytes type. This function always succeeds." msgstr "" msgid "" "Return a new bytes object with a copy of the string *v* as value on success, " "and ``NULL`` on failure. The parameter *v* must not be ``NULL``; it will " "not be checked." msgstr "" msgid "" "Return a new bytes object with a copy of the string *v* as value and length " "*len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents " "of the bytes object are uninitialized." msgstr "" msgid "" "Use the :c:type:`PyBytesWriter` API instead of " "``PyBytes_FromStringAndSize(NULL, len)``." msgstr "" msgid "" "Take a C :c:func:`printf`\\ -style *format* string and a variable number of " "arguments, calculate the size of the resulting Python bytes object and " "return a bytes object with the values formatted into it. The variable " "arguments must be C types and must correspond exactly to the format " "characters in the *format* string. The following format characters are " "allowed:" msgstr "" msgid "Format Characters" msgstr "" msgid "Type" msgstr "Typ" msgid "Comment" msgstr "komentarz" msgid "``%%``" msgstr "``%%``" msgid "*n/a*" msgstr "*n/a*" msgid "The literal % character." msgstr "" msgid "``%c``" msgstr "``%c``" msgid "int" msgstr "int" msgid "A single byte, represented as a C int." msgstr "" msgid "``%d``" msgstr "``%d``" msgid "Equivalent to ``printf(\"%d\")``. [1]_" msgstr "" msgid "``%u``" msgstr "``%u``" msgid "unsigned int" msgstr "nieoznaczony typ int" msgid "Equivalent to ``printf(\"%u\")``. [1]_" msgstr "" msgid "``%ld``" msgstr "``%ld``" msgid "long" msgstr "" msgid "Equivalent to ``printf(\"%ld\")``. [1]_" msgstr "" msgid "``%lu``" msgstr "``%lu``" msgid "unsigned long" msgstr "nieoznaczony typ długi" msgid "Equivalent to ``printf(\"%lu\")``. [1]_" msgstr "" msgid "``%zd``" msgstr "``%zd``" msgid ":c:type:`\\ Py_ssize_t`" msgstr ":c:type:`\\ Py_ssize_t`" msgid "Equivalent to ``printf(\"%zd\")``. [1]_" msgstr "" msgid "``%zu``" msgstr "``%zu``" msgid "size_t" msgstr "size_t" msgid "Equivalent to ``printf(\"%zu\")``. [1]_" msgstr "" msgid "``%i``" msgstr "``%i``" msgid "Equivalent to ``printf(\"%i\")``. [1]_" msgstr "" msgid "``%x``" msgstr "``%x``" msgid "Equivalent to ``printf(\"%x\")``. [1]_" msgstr "" msgid "``%s``" msgstr "``%s``" msgid "const char\\*" msgstr "" msgid "A null-terminated C character array." msgstr "" msgid "``%p``" msgstr "``%p``" msgid "const void\\*" msgstr "" msgid "" "The hex representation of a C pointer. Mostly equivalent to " "``printf(\"%p\")`` except that it is guaranteed to start with the literal " "``0x`` regardless of what the platform's ``printf`` yields." msgstr "" msgid "" "An unrecognized format character causes all the rest of the format string to " "be copied as-is to the result object, and any extra arguments discarded." msgstr "" msgid "" "For integer specifiers (d, u, ld, lu, zd, zu, i, x): the 0-conversion flag " "has effect even when a precision is given." msgstr "" msgid "" "Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two " "arguments." msgstr "" msgid "" "Return the bytes representation of object *o* that implements the buffer " "protocol." msgstr "" msgid "" "If the object implements the buffer protocol, then the buffer must not be " "mutated while the bytes object is being created." msgstr "" msgid "Return the length of the bytes in bytes object *o*." msgstr "" msgid "Similar to :c:func:`PyBytes_Size`, but without error checking." msgstr "" msgid "" "Return a pointer to the contents of *o*. The pointer refers to the internal " "buffer of *o*, which consists of ``len(o) + 1`` bytes. The last byte in the " "buffer is always null, regardless of whether there are any other null " "bytes. The data must not be modified in any way, unless the object was just " "created using ``PyBytes_FromStringAndSize(NULL, size)``. It must not be " "deallocated. If *o* is not a bytes object at all, :c:func:" "`PyBytes_AsString` returns ``NULL`` and raises :exc:`TypeError`." msgstr "" msgid "Similar to :c:func:`PyBytes_AsString`, but without error checking." msgstr "" msgid "" "Return the null-terminated contents of the object *obj* through the output " "variables *buffer* and *length*. Returns ``0`` on success." msgstr "" msgid "" "If *length* is ``NULL``, the bytes object may not contain embedded null " "bytes; if it does, the function returns ``-1`` and a :exc:`ValueError` is " "raised." msgstr "" msgid "" "The buffer refers to an internal buffer of *obj*, which includes an " "additional null byte at the end (not counted in *length*). The data must " "not be modified in any way, unless the object was just created using " "``PyBytes_FromStringAndSize(NULL, size)``. It must not be deallocated. If " "*obj* is not a bytes object at all, :c:func:`PyBytes_AsStringAndSize` " "returns ``-1`` and raises :exc:`TypeError`." msgstr "" msgid "" "Previously, :exc:`TypeError` was raised when embedded null bytes were " "encountered in the bytes object." msgstr "" msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " "appended to *bytes*; the caller will own the new reference. The reference to " "the old value of *bytes* will be \":term:`stolen `\". If the new " "object cannot be created, the old reference to *bytes* will still be " "\"stolen\", the value of *\\*bytes* will be set to ``NULL``, and the " "appropriate exception will be set." msgstr "" msgid "" "If *newpart* implements the buffer protocol, then the buffer must not be " "mutated while the new bytes object is being created." msgstr "" msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " "appended to *bytes*. This version releases the :term:`strong reference` to " "*newpart* (i.e. decrements its reference count)." msgstr "" msgid "Similar to ``sep.join(iterable)`` in Python." msgstr "" msgid "" "*sep* must be Python :class:`bytes` object. (Note that :c:func:" "`PyUnicode_Join` accepts ``NULL`` separator and treats it as a space, " "whereas :c:func:`PyBytes_Join` doesn't accept ``NULL`` separator.)" msgstr "" msgid "" "*iterable* must be an iterable object yielding objects that implement the :" "ref:`buffer protocol `." msgstr "" msgid "" "On success, return a new :class:`bytes` object. On error, set an exception " "and return ``NULL``." msgstr "" msgid "" "If *iterable* objects implement the buffer protocol, then the buffers must " "not be mutated while the new bytes object is being created." msgstr "" msgid "" "Resize a bytes object. *newsize* will be the new length of the bytes object. " "You can think of it as creating a new bytes object and destroying the old " "one, only more efficiently. Pass the address of an existing bytes object as " "an lvalue (it may be written into), and the new size desired. On success, " "*\\*bytes* holds the resized bytes object and ``0`` is returned; the address " "in *\\*bytes* may differ from its input value. If the reallocation fails, " "the original bytes object at *\\*bytes* is deallocated, *\\*bytes* is set to " "``NULL``, :exc:`MemoryError` is set, and ``-1`` is returned." msgstr "" msgid "Use the :c:type:`PyBytesWriter` API instead." msgstr "" msgid "" "Get the string representation of *bytes*. This function is currently used to " "implement :meth:`!bytes.__repr__` in Python." msgstr "" msgid "" "This function does not do type checking; it is undefined behavior to pass " "*bytes* as a non-bytes object or ``NULL``." msgstr "" msgid "" "If *smartquotes* is true, the representation will use a double-quoted string " "instead of single-quoted string when single-quotes are present in *bytes*. " "For example, the byte string ``'Python'`` would be represented as " "``b\"'Python'\"`` when *smartquotes* is true, or ``b'\\'Python\\''`` when it " "is false." msgstr "" msgid "" "On success, this function returns a :term:`strong reference` to a :class:" "`str` object containing the representation. On failure, this returns " "``NULL`` with an exception set." msgstr "" msgid "" "Unescape a backslash-escaped string *s*. *s* must not be ``NULL``. *len* " "must be the size of *s*." msgstr "" msgid "" "*errors* must be one of ``\"strict\"``, ``\"replace\"``, or ``\"ignore\"``. " "If *errors* is ``NULL``, then ``\"strict\"`` is used by default." msgstr "" msgid "" "On success, this function returns a :term:`strong reference` to a Python :" "class:`bytes` object containing the unescaped string. On failure, this " "function returns ``NULL`` with an exception set." msgstr "" msgid "*unicode* and *recode_encoding* are now unused." msgstr "" msgid "PyBytesWriter" msgstr "" msgid "" "The :c:type:`PyBytesWriter` API can be used to create a Python :class:" "`bytes` object." msgstr "" msgid "A bytes writer instance." msgstr "" msgid "" "The API is **not thread safe**. To share a writer with multiple threads, a " "critical section or a lock is needed." msgstr "" msgid "" "The instance must be destroyed by :c:func:`PyBytesWriter_Finish` on success, " "or :c:func:`PyBytesWriter_Discard` on error." msgstr "" msgid "Create, Finish, Discard" msgstr "" msgid "Create a :c:type:`PyBytesWriter` to write *size* bytes." msgstr "" msgid "" "If *size* is greater than zero, allocate *size* bytes, and set the writer " "size to *size*. The caller is responsible to write *size* bytes using :c:" "func:`PyBytesWriter_GetData`. This function does not overallocate." msgstr "" msgid "On error, set an exception and return ``NULL``." msgstr "" msgid "*size* must be positive or zero." msgstr "" msgid "" "Finish a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." msgstr "" msgid "" "On success, return a Python :class:`bytes` object. On error, set an " "exception and return ``NULL``." msgstr "" msgid "" "The writer instance is invalid after the call in any case. No API can be " "called on the writer after :c:func:`PyBytesWriter_Finish`." msgstr "" msgid "" "Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer to *size* " "bytes before creating the :class:`bytes` object." msgstr "" msgid "" "Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer using *buf* " "pointer before creating the :class:`bytes` object." msgstr "" msgid "" "Set an exception and return ``NULL`` if *buf* pointer is outside the " "internal buffer bounds." msgstr "" msgid "Function pseudo-code::" msgstr "" msgid "" "Py_ssize_t size = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n" "return PyBytesWriter_FinishWithSize(writer, size);" msgstr "" msgid "" "Discard a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." msgstr "" msgid "Do nothing if *writer* is ``NULL``." msgstr "" msgid "" "The writer instance is invalid after the call. No API can be called on the " "writer after :c:func:`PyBytesWriter_Discard`." msgstr "" msgid "High-level API" msgstr "" msgid "" "Grow the *writer* internal buffer by *size* bytes, write *size* bytes of " "*bytes* at the *writer* end, and add *size* to the *writer* size." msgstr "" msgid "" "If *size* is equal to ``-1``, call ``strlen(bytes)`` to get the string " "length." msgstr "" msgid "On success, return ``0``. On error, set an exception and return ``-1``." msgstr "" msgid "" "Similar to :c:func:`PyBytes_FromFormat`, but write the output directly at " "the writer end. Grow the writer internal buffer on demand. Then add the " "written size to the writer size." msgstr "" msgid "Getters" msgstr "" msgid "Get the writer size." msgstr "" msgid "" "The function does not invalidate pointers returned by :c:func:" "`PyBytesWriter_GetData`." msgstr "" msgid "The function cannot fail." msgstr "" msgid "Get the writer data: start of the internal buffer." msgstr "" msgid "" "The pointer remains valid until a :c:type:`PyBytesWriter` function other " "than :c:func:`PyBytesWriter_GetData` or :c:func:`PyBytesWriter_GetSize` is " "called on *writer*." msgstr "" msgid "Low-level API" msgstr "" msgid "" "Resize the writer to *size* bytes. It can be used to enlarge or to shrink " "the writer. This function typically overallocates to achieve amortized " "performance when resizing multiple times." msgstr "" msgid "Newly allocated bytes are left uninitialized." msgstr "" msgid "" "Resize the writer by adding *grow* bytes to the current writer size. This " "function typically overallocates to achieve amortized performance when " "resizing multiple times." msgstr "" msgid "*grow* can be negative to shrink the writer." msgstr "" msgid "" "Similar to :c:func:`PyBytesWriter_Grow`, but update also the *buf* pointer." msgstr "" msgid "" "The *buf* pointer is moved if the internal buffer is moved in memory. The " "*buf* relative position within the internal buffer is left unchanged." msgstr "" msgid "*buf* must not be ``NULL``." msgstr "" msgid "" "Py_ssize_t pos = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n" "if (PyBytesWriter_Grow(writer, size) < 0) {\n" " return NULL;\n" "}\n" "return (char*)PyBytesWriter_GetData(writer) + pos;" msgstr "" msgid "Example creating the string ``b'abc'``" msgstr "" msgid "" "Example creating the bytes string ``b\"abc\"``, with a fixed size of 3 " "bytes::" msgstr "" msgid "" "PyObject* create_abc(void)\n" "{\n" " PyBytesWriter *writer = PyBytesWriter_Create(3);\n" " if (writer == NULL) {\n" " return NULL;\n" " }\n" "\n" " char *str = PyBytesWriter_GetData(writer);\n" " memcpy(str, \"abc\", 3);\n" " return PyBytesWriter_Finish(writer);\n" "}" msgstr "" msgid "Variant using a pointer to compute the final size::" msgstr "" msgid "" "PyObject* create_abc_ptr(void)\n" "{\n" " PyBytesWriter *writer = PyBytesWriter_Create(3);\n" " if (writer == NULL) {\n" " return NULL;\n" " }\n" "\n" " char *str = PyBytesWriter_GetData(writer);\n" " memcpy(str, \"abc\", 3);\n" " str += 1;\n" " return PyBytesWriter_FinishWithPointer(writer, str);\n" "}" msgstr "" msgid "Update ``PyBytes_FromStringAndSize()`` code" msgstr "" msgid "" "Example of code using the soft deprecated ``PyBytes_FromStringAndSize(NULL, " "size)`` API::" msgstr "" msgid "" "int copy_bytes(char *dest, const char *src, Py_ssize_t num_bytes)\n" "{\n" " ...\n" "}\n" "\n" "PyObject* create_string(const char *start, Py_ssize_t num_bytes)\n" "{\n" " PyObject *result = PyBytes_FromStringAndSize(NULL, num_bytes);\n" " if (result == NULL) {\n" " return NULL;\n" " }\n" " if (copy_bytes(PyBytes_AS_STRING(result), start, num_bytes) < 0) {\n" " Py_CLEAR(result);\n" " }\n" " return result;\n" "}" msgstr "" msgid "It can now be updated to::" msgstr "" msgid "" "PyObject* create_string(const char *start, Py_ssize_t num_bytes)\n" "{\n" " PyBytesWriter *writer = PyBytesWriter_Create(num_bytes);\n" " if (writer == NULL) {\n" " return NULL;\n" " }\n" " if (copy_bytes(PyBytesWriter_GetData(writer), start, num_bytes) < 0) {\n" " PyBytesWriter_Discard(writer);\n" " return NULL;\n" " }\n" " return PyBytesWriter_Finish(writer);\n" "}" msgstr "" msgid "Update ``_PyBytes_Resize()`` code" msgstr "" msgid "Example of code using the soft deprecated ``_PyBytes_Resize()`` API::" msgstr "" msgid "" "void create_string(Py_ssize_t size)\n" "{\n" " PyObject *bytes = PyBytes_FromStringAndSize(NULL, size);\n" " if (bytes == NULL) {\n" " return NULL;\n" " }\n" " char *str = PyBytes_AS_STRING(bytes);\n" "\n" " // ... write data into str ...\n" "\n" " if (_PyBytes_Resize(&bytes, (str - PyBytes_AS_STRING(bytes)))) {\n" " return NULL;\n" " }\n" " return bytes;\n" "}" msgstr "" msgid "" "void create_string(Py_ssize_t size)\n" "{\n" " PyBytesWriter *writer = PyBytesWriter_Create(size);\n" " if (writer == NULL) {\n" " return NULL;\n" " }\n" " char *str = PyBytesWriter_GetData(writer);\n" "\n" " // ... write data into str ...\n" "\n" " return PyBytesWriter_FinishWithPointer(writer, str);\n" "}" msgstr "" msgid "object" msgstr "obiekt" msgid "bytes" msgstr ""