# 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 # Dennis Betz, 2025 # msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Dennis Betz, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../../c-api/arg.rst:6 msgid "Parsing arguments and building values" msgstr "Argumente auswerten und Werte bilden" #: ../../c-api/arg.rst:8 msgid "" "These functions are useful when creating your own extension functions and " "methods. Additional information and examples are available " "in :ref:`extending-index`." msgstr "" "Diese Funktionen sind nützlich, wenn du eigene Erweiterungsfunktionen und " "-methoden erstellst. Weitere Informationen und Beispiele findest du " "unter :ref:`extending-index`." #: ../../c-api/arg.rst:12 msgid "" "The first three of these functions " "described, :c:func:`PyArg_ParseTuple`, :c:func:`PyArg_ParseTupleAndKeywords`, " "and :c:func:`PyArg_Parse`, all use *format strings* which are used to tell " "the function about the expected arguments. The format strings use the same " "syntax for each of these functions." msgstr "" "Die ersten drei der beschriebenen Funktionen " "– :c:func:`PyArg_ParseTuple`, :c:func:`PyArg_ParseTupleAndKeywords` " "und :c:func:`PyArg_Parse` – verwenden alle *Formatzeichenfolgen*, mit denen " "der Funktion die erwarteten Argumente mitgeteilt werden. Die " "Formatzeichenfolgen haben bei allen diesen Funktionen dieselbe Syntax." #: ../../c-api/arg.rst:19 msgid "Parsing arguments" msgstr "Argumente auswerten" #: ../../c-api/arg.rst:21 msgid "" "A format string consists of zero or more \"format units.\" A format unit " "describes one Python object; it is usually a single character or a " "parenthesized sequence of format units. With a few exceptions, a format " "unit that is not a parenthesized sequence normally corresponds to a single " "address argument to these functions. In the following description, the " "quoted form is the format unit; the entry in (round) parentheses is the " "Python object type that matches the format unit; and the entry in [square] " "brackets is the type of the C variable(s) whose address should be passed." msgstr "" "Eine Formatzeichenfolge besteht aus null oder mehr „Formateinheiten“. Eine " "Formateinheit beschreibt ein Python-Objekt. Dabei handelt es sich in der " "Regel um ein einzelnes Zeichen oder eine in Klammern gesetzte Folge von " "Formateinheiten. Mit wenigen Ausnahmen entspricht eine Formateinheit, die " "keine in Klammern gesetzte Folge ist, normalerweise einem einzelnen " "Adressargument dieser Funktionen. In der folgenden Beschreibung ist die in " "Anführungszeichen gesetzte Form die Formateinheit. Der Eintrag in (runden) " "Klammern ist der Python-Objekttyp, der der Formateinheit entspricht, und der " "Eintrag in [eckigen] Klammern ist der Typ der C-Variablen, deren Adresse " "übergeben werden soll." #: ../../c-api/arg.rst:33 msgid "Strings and buffers" msgstr "Zeichenketten und Puffer" #: ../../c-api/arg.rst:37 msgid "" "On Python 3.12 and older, the macro :c:macro:`!PY_SSIZE_T_CLEAN` must be " "defined before including :file:`Python.h` to use all ``#`` variants of " "formats (``s#``, ``y#``, etc.) explained below. This is not necessary on " "Python 3.13 and later." msgstr "" "Unter Python 3.12 und älteren Versionen muss das Makro „ :c:macro:`!" "PY_SSIZE_T_CLEAN` “ definiert werden, bevor „ :file:`Python.h` “ eingebunden " "wird, um alle unten erläuterten „ ``#`` “-Varianten der Formate (``s#``, " "``y#`` usw.) nutzen zu können. Unter Python 3.13 und späteren Versionen ist " "dies nicht erforderlich." #: ../../c-api/arg.rst:42 msgid "" "These formats allow accessing an object as a contiguous chunk of memory. You " "don't have to provide raw storage for the returned unicode or bytes area." msgstr "" "Diese Formate ermöglichen den Zugriff auf ein Objekt als zusammenhängenden " "Speicherblock. Du musst keinen Rohspeicher für den zurückgegebenen Unicode- " "oder Byte-Bereich bereitstellen." #: ../../c-api/arg.rst:46 msgid "Unless otherwise stated, buffers are not NUL-terminated." msgstr "So lange nicht anders festgelegt, sind Buffer nicht NUL-terminiert." #: ../../c-api/arg.rst:48 msgid "There are three ways strings and buffers can be converted to C:" msgstr "" "Es gibt drei Möglichkeiten, Zeichenketten und Puffer in C zu konvertieren:" #: ../../c-api/arg.rst:50 msgid "" "Formats such as ``y*`` and ``s*`` fill a :c:type:`Py_buffer` structure. This " "locks the underlying buffer so that the caller can subsequently use the " "buffer even inside a :c:type:`Py_BEGIN_ALLOW_THREADS` block without the risk " "of mutable data being resized or destroyed. As a result, **you have to " "call** :c:func:`PyBuffer_Release` after you have finished processing the " "data (or in any early abort case)." msgstr "" "Formate wie „ ``y*`` “ und „ ``s*`` “ füllen eine „ :c:type:`Py_buffer` “-" "Struktur. Dadurch wird der zugrunde liegende Puffer gesperrt, sodass der " "Aufrufer den Puffer anschließend sogar innerhalb eines " "„ :c:type:`Py_BEGIN_ALLOW_THREADS` “-Blocks verwenden kann, ohne dass die " "Gefahr besteht, dass veränderbare Daten in ihrer Größe angepasst oder " "zerstört werden. Daher **musst du** „ :c:func:`PyBuffer_Release` “ aufrufen, " "nachdem du die Verarbeitung der Daten abgeschlossen hast (oder im Falle " "eines vorzeitigen Abbruchs)." #: ../../c-api/arg.rst:57 msgid "" "The ``es``, ``es#``, ``et`` and ``et#`` formats allocate the result buffer. " "**You have to call** :c:func:`PyMem_Free` after you have finished processing " "the data (or in any early abort case)." msgstr "" "Die Formate „ ``es`` “, „ ``es#`` “, „ ``et`` “ und „ ``et#`` “ reservieren " "den Ergebnispuffer. **Du musst** „ :c:func:`PyMem_Free` “ aufrufen, nachdem " "du die Datenverarbeitung abgeschlossen hast (oder im Falle eines vorzeitigen " "Abbruchs)." #: ../../c-api/arg.rst:63 msgid "" "Other formats take a :class:`str` or a read-only :term:`bytes-like object`, " "such as :class:`bytes`, and provide a ``const char *`` pointer to its " "buffer. In this case the buffer is \"borrowed\": it is managed by the " "corresponding Python object, and shares the lifetime of this object. You " "won't have to release any memory yourself." msgstr "" "Andere Formate nehmen ein :class:`str` oder ein " "schreibgeschütztes :term:`bytes-ähnliches Objekt ` " "entgegen, wie beispielsweise :class:`bytes`, und stellen einen ``const char " "*``-Zeiger auf dessen Puffer bereit. In diesem Fall wird der Puffer " "„ausgeliehen“: Er wird vom entsprechenden Python-Objekt verwaltet und hat " "dieselbe Lebensdauer wie dieses Objekt. Du musst selbst keinen Speicher " "freigeben." #: ../../c-api/arg.rst:70 msgid "" "To ensure that the underlying buffer may be safely borrowed, the " "object's :c:member:`PyBufferProcs.bf_releasebuffer` field must be ``NULL``. " "This disallows common mutable objects such as :class:`bytearray`, but also " "some read-only objects such as :class:`memoryview` of :class:`bytes`." msgstr "" "Um sicherzustellen, dass der zugrunde liegende Puffer sicher ausgeliehen " "werden kann, muss das Feld „ :c:member:`PyBufferProcs.bf_releasebuffer` " "“ des Objekts auf „ ``NULL`` “ gesetzt sein. Dadurch werden gängige " "veränderbare Objekte wie :class:`bytearray` ausgeschlossen, aber auch einige " "schreibgeschützte Objekte wie :class:`memoryview` oder :class:`bytes`." #: ../../c-api/arg.rst:76 msgid "" "Besides this ``bf_releasebuffer`` requirement, there is no check to verify " "whether the input object is immutable (e.g. whether it would honor a request " "for a writable buffer, or whether another thread can mutate the data)." msgstr "" "Abgesehen von dieser Anforderung unter ``bf_releasebuffer`` gibt es keine " "Überprüfung, ob das Eingabeobjekt unveränderlich ist (z. B. ob es eine " "Anforderung nach einem beschreibbaren Puffer erfüllen würde oder ob ein " "anderer Thread die Daten verändern kann)." #: ../../c-api/arg.rst:80 msgid "``s`` (:class:`str`) [const char \\*]" msgstr "``s`` (:class:`str`) [const char \\*]" #: ../../c-api/arg.rst:81 msgid "" "Convert a Unicode object to a C pointer to a character string. A pointer to " "an existing string is stored in the character pointer variable whose address " "you pass. The C string is NUL-terminated. The Python string must not " "contain embedded null code points; if it does, a :exc:`ValueError` exception " "is raised. Unicode objects are converted to C strings using ``'utf-8'`` " "encoding. If this conversion fails, a :exc:`UnicodeError` is raised." msgstr "" "Konvertiert ein Unicode-Objekt in einen C-Zeiger auf eine Zeichenkette. Ein " "Zeiger auf eine vorhandene Zeichenkette wird in der Zeichenzeiger-Variablen " "gespeichert, deren Adresse du übergibst. Die C-Zeichenkette ist NUL-" "terminiert. Die Python-Zeichenkette darf keine eingebetteten Null-Codepunkte " "enthalten. Ist dies der Fall, wird eine Ausnahme vom Typ „ :exc:`ValueError` " "“ ausgelöst. Unicode-Objekte werden unter Verwendung der „ ``'utf-8'`` “-" "Kodierung in C-Zeichenketten konvertiert. Wenn diese Konvertierung " "fehlschlägt, wird eine Ausnahme vom Typ „ :exc:`UnicodeError` “ ausgelöst." #: ../../c-api/arg.rst:90 msgid "" "This format does not accept :term:`bytes-like objects `. " "If you want to accept filesystem paths and convert them to C character " "strings, it is preferable to use the ``O&`` format " "with :c:func:`PyUnicode_FSConverter` as *converter*." msgstr "" "Dieses Format akzeptiert keine :term:`bytes-ähnlichen Objekte `. Wenn du Dateisystempfade akzeptieren und diese in C-Zeichenketten " "konvertieren möchtest, solltest du vorzugsweise das Format „ ``O&`` “ mit " "„ :c:func:`PyUnicode_FSConverter` “ als *Konverter* verwenden." #: ../../c-api/arg.rst:96 msgid "" "Previously, :exc:`TypeError` was raised when embedded null code points were " "encountered in the Python string." msgstr "" "Bisher wurde ein „ :exc:`TypeError` “-Fehler ausgelöst, wenn in der Python-" "Zeichenkette eingebettete Null-Codepunkte auftraten." #: ../../c-api/arg.rst:100 msgid "``s*`` (:class:`str` or :term:`bytes-like object`) [Py_buffer]" msgstr "" "``s*`` (:class:`str` oder :term:`bytes-ähnliches Objekt `) [Py_buffer]" #: ../../c-api/arg.rst:101 msgid "" "This format accepts Unicode objects as well as bytes-like objects. It fills " "a :c:type:`Py_buffer` structure provided by the caller. In this case the " "resulting C string may contain embedded NUL bytes. Unicode objects are " "converted to C strings using ``'utf-8'`` encoding." msgstr "" "Dieses Format akzeptiert sowohl Unicode-Objekte als auch byteähnliche " "Objekte. Es füllt eine vom Aufrufer bereitgestellte „ :c:type:`Py_buffer` “-" "Struktur. In diesem Fall kann die resultierende C-Zeichenkette eingebettete " "NUL-Bytes enthalten. Unicode-Objekte werden unter Verwendung der " "„ ``'utf-8'`` “-Kodierung in C-Zeichenketten konvertiert." #: ../../c-api/arg.rst:106 msgid "" "``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char " "\\*, :c:type:`Py_ssize_t`]" msgstr "" "``s#`` (:class:`str`, schreibgeschützt: :term:`bytes-ähnliches Objekt `) [const char \\*, :c:type:`Py_ssize_t`]" #: ../../c-api/arg.rst:107 msgid "" "Like ``s*``, except that it provides a :ref:`borrowed buffer `. The result is stored into two C variables, the first one a pointer " "to a C string, the second one its length. The string may contain embedded " "null bytes. Unicode objects are converted to C strings using ``'utf-8'`` " "encoding." msgstr "" "Ähnlich wie ``s*``, mit dem Unterschied, dass hier ein :ref:`geliehener " "Puffer ` bereitgestellt wird. Das Ergebnis wird in " "zwei C-Variablen gespeichert, wobei die erste ein Zeiger auf eine C-" "Zeichenkette und die zweite deren Länge ist. Die Zeichenkette darf " "eingebettete Null-Bytes enthalten. Unicode-Objekte werden mithilfe der " "``'utf-8'``-Kodierung in C-Zeichenketten konvertiert." #: ../../c-api/arg.rst:113 ../../c-api/arg.rst:648 msgid "``z`` (:class:`str` or ``None``) [const char \\*]" msgstr "``z`` (:class:`str` oder ``None``) [const char \\*]" #: ../../c-api/arg.rst:114 msgid "" "Like ``s``, but the Python object may also be ``None``, in which case the C " "pointer is set to ``NULL``." msgstr "" "Ähnlich wie bei ``s``, allerdings kann das Python-Objekt auch ``None`` sein. " "In diesem Fall wird der C-Zeiger auf ``NULL`` gesetzt." #: ../../c-api/arg.rst:117 msgid "" "``z*`` (:class:`str`, :term:`bytes-like object` or ``None``) [Py_buffer]" msgstr "" "``z*`` (:class:`str`, :term:`bytes-ähnliches Objekt ` " "oder ``None``) [Py_buffer]" #: ../../c-api/arg.rst:118 msgid "" "Like ``s*``, but the Python object may also be ``None``, in which case the " "``buf`` member of the :c:type:`Py_buffer` structure is set to ``NULL``." msgstr "" "Ähnlich wie bei ``s*``, wobei das Python-Objekt auch ``None`` sein kann. In " "diesem Fall wird das Element ``buf`` der Struktur :c:type:`Py_buffer` auf " "``NULL`` gesetzt." #: ../../c-api/arg.rst:121 msgid "" "``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) " "[const char \\*, :c:type:`Py_ssize_t`]" msgstr "" "``z#`` (:class:`str`, schreibgeschützt: :term:`bytes-ähnliches Objekt ` oder ``None``) [const char \\*, :c:type:`Py_ssize_t`]" #: ../../c-api/arg.rst:122 msgid "" "Like ``s#``, but the Python object may also be ``None``, in which case the C " "pointer is set to ``NULL``." msgstr "" "Ähnlich wie bei ``s#``, allerdings kann das Python-Objekt auch ``None`` " "sein. In diesem Fall wird der C-Zeiger auf ``NULL`` gesetzt." #: ../../c-api/arg.rst:125 msgid "``y`` (read-only :term:`bytes-like object`) [const char \\*]" msgstr "" "``y`` (schreibgeschützt :term:`bytes-ähnliches Objekt `) " "[const char \\*]" #: ../../c-api/arg.rst:126 msgid "" "This format converts a bytes-like object to a C pointer to a :ref:`borrowed " "` character string; it does not accept Unicode " "objects. The bytes buffer must not contain embedded null bytes; if it does, " "a :exc:`ValueError` exception is raised." msgstr "" "Dieses Format konvertiert ein bytes-ähnliches Objekt in einen C-Zeiger auf " "eine :ref:`borrowed ` Zeichenkette; Unicode-Objekte " "werden nicht akzeptiert. Der Byte-Puffer darf keine eingebetteten Null-Bytes " "enthalten. Ist dies der Fall, wird eine Ausnahme vom Typ „ :exc:`ValueError` " "“ ausgelöst." #: ../../c-api/arg.rst:132 msgid "" "Previously, :exc:`TypeError` was raised when embedded null bytes were " "encountered in the bytes buffer." msgstr "" "Bisher wurde die Ausnahme „ :exc:`TypeError` “ ausgelöst, wenn im Byte-" "Puffer eingebettete Null-Bytes gefunden wurden." #: ../../c-api/arg.rst:136 msgid "``y*`` (:term:`bytes-like object`) [Py_buffer]" msgstr "``y*`` (:term:`Byte-ähnliches Objekt `) [Py_buffer]" #: ../../c-api/arg.rst:137 msgid "" "This variant on ``s*`` doesn't accept Unicode objects, only bytes-like " "objects. **This is the recommended way to accept binary data.**" msgstr "" "Diese Variante von ``s*`` akzeptiert keine Unicode-Objekte, sondern nur " "byteähnliche Objekte. **Dies ist die empfohlene Vorgehensweise zum " "Akzeptieren von Binärdaten.**" #: ../../c-api/arg.rst:141 msgid "" "``y#`` (read-only :term:`bytes-like object`) [const char " "\\*, :c:type:`Py_ssize_t`]" msgstr "" "``y#`` (schreibgeschützt: :term:`bytes-ähnliches Objekt `) [const char \\*, :c:type:`Py_ssize_t`]" #: ../../c-api/arg.rst:142 msgid "" "This variant on ``s#`` doesn't accept Unicode objects, only bytes-like " "objects." msgstr "" "Diese Variante von ``s#`` akzeptiert keine Unicode-Objekte, sondern nur " "byteähnliche Objekte." #: ../../c-api/arg.rst:145 msgid "``S`` (:class:`bytes`) [PyBytesObject \\*]" msgstr "``S`` (:class:`bytes`) [PyBytesObject \\*]" #: ../../c-api/arg.rst:146 msgid "" "Requires that the Python object is a :class:`bytes` object, without " "attempting any conversion. Raises :exc:`TypeError` if the object is not a " "bytes object. The C variable may also be declared as :c:expr:`PyObject*`." msgstr "" "Erfordert, dass das Python-Objekt ein „ :class:`bytes` “-Objekt ist, ohne " "dass eine Konvertierung versucht wird. Löst eine „ :exc:`TypeError` “-" "Ausnahme aus, wenn das Objekt kein „bytes“-Objekt ist. Die C-Variable kann " "auch als „ :c:expr:`PyObject*` “ deklariert werden." #: ../../c-api/arg.rst:150 msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" msgstr "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" #: ../../c-api/arg.rst:151 msgid "" "Requires that the Python object is a :class:`bytearray` object, without " "attempting any conversion. Raises :exc:`TypeError` if the object is not " "a :class:`bytearray` object. The C variable may also be declared " "as :c:expr:`PyObject*`." msgstr "" "Erfordert, dass das Python-Objekt ein „ :class:`bytearray` “-Objekt ist, " "ohne dass eine Konvertierung versucht wird. Löst „ :exc:`TypeError` “ aus, " "wenn das Objekt kein „ :class:`bytearray` “-Objekt ist. Die C-Variable kann " "auch als „ :c:expr:`PyObject*` “ deklariert werden." #: ../../c-api/arg.rst:155 msgid "``U`` (:class:`str`) [PyObject \\*]" msgstr "``U`` (:class:`str`) [PyObject \\*]" #: ../../c-api/arg.rst:156 msgid "" "Requires that the Python object is a Unicode object, without attempting any " "conversion. Raises :exc:`TypeError` if the object is not a Unicode object. " "The C variable may also be declared as :c:expr:`PyObject*`." msgstr "" "Setzt voraus, dass das Python-Objekt ein Unicode-Objekt ist, ohne dass eine " "Konvertierung versucht wird. Löst eine „ :exc:`TypeError` “-Ausnahme aus, " "wenn das Objekt kein Unicode-Objekt ist. Die C-Variable kann auch als " "„ :c:expr:`PyObject*` “ deklariert werden." #: ../../c-api/arg.rst:160 msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]" msgstr "" "``w*`` (Lese-/Schreibzugriff: :term:`byteähnliches Objekt `) [Py_buffer]" #: ../../c-api/arg.rst:161 msgid "" "This format accepts any object which implements the read-write buffer " "interface. It fills a :c:type:`Py_buffer` structure provided by the caller. " "The buffer may contain embedded null bytes. The caller has to " "call :c:func:`PyBuffer_Release` when it is done with the buffer." msgstr "" "Dieses Format akzeptiert jedes Objekt, das die Lese-/Schreib-Puffer-" "Schnittstelle implementiert. Es füllt eine vom Aufrufer bereitgestellte " "„ :c:type:`Py_buffer` “-Struktur. Der Puffer kann eingebettete Null-Bytes " "enthalten. Der Aufrufer muss „ :c:func:`PyBuffer_Release` “ aufrufen, sobald " "er den Puffer nicht mehr benötigt." #: ../../c-api/arg.rst:166 msgid "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" msgstr "``es`` (:class:`str`) [const char \\*encoding, char \\*\\**buffer]" #: ../../c-api/arg.rst:167 msgid "" "This variant on ``s`` is used for encoding Unicode into a character buffer. " "It only works for encoded data without embedded NUL bytes." msgstr "" "Diese Variante von ``s`` dient dazu, Unicode in einen Zeichenpuffer zu " "kodieren. Sie funktioniert nur bei kodierten Daten ohne eingebettete NUL-" "Bytes." #: ../../c-api/arg.rst:170 msgid "" "This format requires two arguments. The first is only used as input, and " "must be a :c:expr:`const char*` which points to the name of an encoding as a " "NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is " "used. An exception is raised if the named encoding is not known to Python. " "The second argument must be a :c:expr:`char**`; the value of the pointer it " "references will be set to a buffer with the contents of the argument text. " "The text will be encoded in the encoding specified by the first argument." msgstr "" "Dieses Format erfordert zwei Argumente. Das erste wird nur als Eingabe " "verwendet und muss ein :c:expr:`const char*` sein, der auf den Namen einer " "Kodierung als NUL-terminierte Zeichenkette zeigt, oder ``NULL``. In diesem " "Fall wird die Kodierung ``'utf-8'`` verwendet. Ist die angegebene Kodierung " "in Python nicht bekannt, wird eine Ausnahme ausgelöst. Das zweite Argument " "muss ein :c:expr:`char**` sein. Der Wert des Zeigers, auf den es verweist, " "wird auf einen Puffer mit dem Inhalt des Argumenttexts gesetzt. Der Text " "wird in der Kodierung abgelegt, die durch das erste Argument angegeben wird." #: ../../c-api/arg.rst:178 msgid "" ":c:func:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy " "the encoded data into this buffer and adjust *\\*buffer* to reference the " "newly allocated storage. The caller is responsible for " "calling :c:func:`PyMem_Free` to free the allocated buffer after use." msgstr "" ":c:func:`PyArg_ParseTuple` wird einen Puffer der erforderlichen Größe " "zuweisen, die kodierten Daten in diesen Puffer kopieren und *\\*buffer* so " "anpassen, dass er auf den neu zugewiesenen Speicher verweist. Der Aufrufer " "ist dafür verantwortlich, nach der Verwendung die " "Funktion :c:func:`PyMem_Free` aufzurufen, um den zugewiesenen Puffer " "freizugeben." #: ../../c-api/arg.rst:183 msgid "" "``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " "\\*encoding, char \\*\\*buffer]" msgstr "" "``et`` (:class:`str`, :class:`bytes` oder :class:`bytearray`) [const char " "\\*encoding, char \\*\\*buffer]" #: ../../c-api/arg.rst:184 msgid "" "Same as ``es`` except that byte string objects are passed through without " "recoding them. Instead, the implementation assumes that the byte string " "object uses the encoding passed in as parameter." msgstr "" "Entspricht der Funktion „ ``es`` “, mit dem Unterschied, dass Byte-String-" "Objekte ohne Umkodierung weitergereicht werden. Stattdessen geht die " "Implementierung davon aus, dass das Byte-String-Objekt die als Parameter " "übergebene Kodierung verwendet." #: ../../c-api/arg.rst:188 msgid "" "``es#`` (:class:`str`) [const char \\*encoding, char " "\\*\\*buffer, :c:type:`Py_ssize_t` \\*buffer_length]" msgstr "" "``es#`` (:class:`str`) [const char \\*encoding, char " "\\*\\*buffer, :c:type:`Py_ssize_t` \\*buffer_length]" #: ../../c-api/arg.rst:189 msgid "" "This variant on ``s#`` is used for encoding Unicode into a character buffer. " "Unlike the ``es`` format, this variant allows input data which contains NUL " "characters." msgstr "" "Diese Variante von „ ``s#`` “ dient zur Kodierung von Unicode in einen " "Zeichenpuffer. Im Gegensatz zum Format „ ``es`` “ erlaubt diese Variante " "Eingabedaten, die NUL-Zeichen enthalten." #: ../../c-api/arg.rst:193 msgid "" "It requires three arguments. The first is only used as input, and must be " "a :c:expr:`const char*` which points to the name of an encoding as a NUL-" "terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used. " "An exception is raised if the named encoding is not known to Python. The " "second argument must be a :c:expr:`char**`; the value of the pointer it " "references will be set to a buffer with the contents of the argument text. " "The text will be encoded in the encoding specified by the first argument. " "The third argument must be a pointer to an integer; the referenced integer " "will be set to the number of bytes in the output buffer." msgstr "" "Die Funktion benötigt drei Argumente. Das erste dient lediglich als Eingabe " "und muss ein :c:expr:`const char*` sein, das auf den Namen einer Kodierung " "als NUL-terminierte Zeichenkette verweist, oder ``NULL`` – in diesem Fall " "wird die Kodierung ``'utf-8'`` verwendet. Wenn die angegebene Kodierung " "Python nicht bekannt ist, wird eine Ausnahme ausgelöst. Das zweite Argument " "muss ein :c:expr:`char**` sein. Der Wert des Zeigers, auf den es verweist, " "wird auf einen Puffer mit dem Inhalt des Textarguments gesetzt. Der Text " "wird in der durch das erste Argument angegebenen Kodierung kodiert. Das " "dritte Argument muss ein Zeiger auf eine Ganzzahl sein. Die Ganzzahl, auf " "die verwiesen wird, wird auf die Anzahl der Bytes im Ausgabepuffer gesetzt." #: ../../c-api/arg.rst:203 msgid "There are two modes of operation:" msgstr "Es gibt zwei Betriebsmodi:" #: ../../c-api/arg.rst:205 msgid "" "If *\\*buffer* points a ``NULL`` pointer, the function will allocate a " "buffer of the needed size, copy the encoded data into this buffer and set " "*\\*buffer* to reference the newly allocated storage. The caller is " "responsible for calling :c:func:`PyMem_Free` to free the allocated buffer " "after usage." msgstr "" "Wenn *\\*buffer* auf einen Zeiger vom Typ „ ``NULL`` “ verweist, reserviert " "die Funktion einen Puffer der erforderlichen Größe, kopiert die kodierten " "Daten in diesen Puffer und setzt *\\*buffer* so, dass er auf den neu " "reservierten Speicher verweist. Der Aufrufer ist dafür verantwortlich, nach " "der Nutzung die Funktion „ :c:func:`PyMem_Free` “ aufzurufen, um den " "reservierten Puffer freizugeben." #: ../../c-api/arg.rst:210 msgid "" "If *\\*buffer* points to a non-``NULL`` pointer (an already allocated " "buffer), :c:func:`PyArg_ParseTuple` will use this location as the buffer and " "interpret the initial value of *\\*buffer_length* as the buffer size. It " "will then copy the encoded data into the buffer and NUL-terminate it. If " "the buffer is not large enough, a :exc:`ValueError` will be set." msgstr "" "Wenn *\\*buffer* auf einen nicht-``NULL`` en Zeiger (einen bereits " "zugewiesenen Puffer) verweist, verwendet :c:func:`PyArg_ParseTuple` diesen " "Speicherort als Puffer und interpretiert den Anfangswert von " "*\\*buffer_length* als Puffergröße. Anschließend kopiert die Funktion die " "kodierten Daten in den Puffer und fügt am Ende ein NUL-Zeichen ein. Ist der " "Puffer nicht groß genug, wird ein Fehlercode „ :exc:`ValueError` “ gesetzt." #: ../../c-api/arg.rst:216 msgid "" "In both cases, *\\*buffer_length* is set to the length of the encoded data " "without the trailing NUL byte." msgstr "" "In beiden Fällen wird *\\*buffer_length* auf die Länge der kodierten Daten " "ohne das abschließende NUL-Byte gesetzt." #: ../../c-api/arg.rst:219 msgid "" "``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " "\\*encoding, char \\*\\*buffer, :c:type:`Py_ssize_t` \\*buffer_length]" msgstr "" "``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " "\\*encoding, char \\*\\*buffer, :c:type:`Py_ssize_t` \\*buffer_length]" #: ../../c-api/arg.rst:220 msgid "" "Same as ``es#`` except that byte string objects are passed through without " "recoding them. Instead, the implementation assumes that the byte string " "object uses the encoding passed in as parameter." msgstr "" "Entspricht der Funktion „ ``es#`` “, mit dem Unterschied, dass Byte-String-" "Objekte ohne Umkodierung weitergeleitet werden. Stattdessen geht die " "Implementierung davon aus, dass das Byte-String-Objekt die als Parameter " "übergebene Kodierung verwendet." #: ../../c-api/arg.rst:224 msgid "" "``u``, ``u#``, ``Z``, and ``Z#`` are removed because they used a legacy " "``Py_UNICODE*`` representation." msgstr "" "``u``, ``u#``, ``Z`` und ``Z#`` wurden entfernt, da sie eine veraltete " "Darstellung von „ ``Py_UNICODE*`` “ verwendeten." #: ../../c-api/arg.rst:230 msgid "Numbers" msgstr "Zahlen" #: ../../c-api/arg.rst:232 msgid "" "These formats allow representing Python numbers or single characters as C " "numbers. Formats that require :class:`int`, :class:`float` " "or :class:`complex` can also use the corresponding special " "methods :meth:`~object.__index__`, :meth:`~object.__float__` " "or :meth:`~object.__complex__` to convert the Python object to the required " "type." msgstr "" "Mit diesen Formaten lassen sich Python-Zahlen oder einzelne Zeichen als C-" "Zahlen darstellen. Formate, die „ :class:`int` “, „ :class:`float` “ oder " "„ :class:`complex` “ erfordern, können auch die entsprechenden speziellen " "Methoden „ :meth:`~object.__index__` “, „ :meth:`~object.__float__` “ oder " "„ :meth:`~object.__complex__` “ verwenden, um das Python-Objekt in den " "erforderlichen Typ zu konvertieren." #: ../../c-api/arg.rst:238 msgid "" "For signed integer formats, :exc:`OverflowError` is raised if the value is " "out of range for the C type. For unsigned integer formats, the most " "significant bits are silently truncated when the receiving field is too " "small to receive the value, and :exc:`DeprecationWarning` is emitted when " "the value is larger than the maximal value for the C type or less than the " "minimal value for the corresponding signed integer type of the same size." msgstr "" "Bei Formaten für vorzeichenbehaftete Ganzzahlen wird :exc:`OverflowError` " "ausgelöst, wenn der Wert außerhalb des Wertebereichs des C-Typs liegt. Bei " "Formaten für vorzeichenlose Ganzzahlen werden die höchstwertigen Bits " "stillschweigend abgeschnitten, wenn das aufnehmende Feld zu klein für den " "Wert ist, und es wird :exc:`DeprecationWarning` ausgegeben, wenn der Wert " "größer als der Maximalwert des C-Typs oder kleiner als der Minimalwert des " "entsprechenden vorzeichenbehafteten Ganzzahltyps gleicher Größe ist." #: ../../c-api/arg.rst:246 msgid "``b`` (:class:`int`) [unsigned char]" msgstr "``b`` (:class:`int`) [unsigned char]" #: ../../c-api/arg.rst:247 msgid "" "Convert a nonnegative Python integer to an unsigned tiny integer, stored in " "a C :c:expr:`unsigned char`." msgstr "" "Konvertiert eine nicht-negative Python-Ganzzahl in eine vorzeichenlose " "kleine Ganzzahl, die in einem C :c:expr:`unsigned char` gespeichert wird." #: ../../c-api/arg.rst:250 ../../c-api/arg.rst:682 msgid "``B`` (:class:`int`) [unsigned char]" msgstr "``B`` (:class:`int`) [unsigned char]" #: ../../c-api/arg.rst:251 msgid "" "Convert a Python integer to a tiny integer without overflow checking, stored " "in a C :c:expr:`unsigned char`. Convert a Python integer to a " "C :c:expr:`unsigned char`." msgstr "" "Konvertiere eine Python-Ganzzahl ohne Überlaufprüfung in eine sehr kleine " "Ganzzahl, die in einem C :c:expr:`unsigned char` abgelegt wird. Konvertiere " "eine Python-Ganzzahl in einen C :c:expr:`unsigned char`." #: ../../c-api/arg.rst:255 ../../c-api/arg.rst:676 msgid "``h`` (:class:`int`) [short int]" msgstr "``h`` (:class:`int`) [short int]" #: ../../c-api/arg.rst:256 msgid "Convert a Python integer to a C :c:expr:`short int`." msgstr "Konvertiere eine Python-Ganzzahl in einen C :c:expr:`short int`." #: ../../c-api/arg.rst:258 ../../c-api/arg.rst:685 msgid "``H`` (:class:`int`) [unsigned short int]" msgstr "``H`` (:class:`int`) [unsigned short int]" #: ../../c-api/arg.rst:259 msgid "Convert a Python integer to a C :c:expr:`unsigned short int`." msgstr "" "Konvertiere eine Python-Ganzzahl in einen C :c:expr:`unsigned short int`." #: ../../c-api/arg.rst:261 ../../c-api/arg.rst:670 msgid "``i`` (:class:`int`) [int]" msgstr "``i`` (:class:`int`) [int]" #: ../../c-api/arg.rst:262 msgid "Convert a Python integer to a plain C :c:expr:`int`." msgstr "Konvertiert eine Python-Ganzzahl in eine einfache C- :c:expr:`int`." #: ../../c-api/arg.rst:264 ../../c-api/arg.rst:688 msgid "``I`` (:class:`int`) [unsigned int]" msgstr "``I`` (:class:`int`) [unsigned int]" #: ../../c-api/arg.rst:265 msgid "Convert a Python integer to a C :c:expr:`unsigned int`." msgstr "Konvertiere eine Python-Ganzzahl in einen C :c:expr:`unsigned int`." #: ../../c-api/arg.rst:267 ../../c-api/arg.rst:679 msgid "``l`` (:class:`int`) [long int]" msgstr "``l`` (:class:`int`) [long int]" #: ../../c-api/arg.rst:268 msgid "Convert a Python integer to a C :c:expr:`long int`." msgstr "Konvertiere eine Python-Ganzzahl in einen C :c:expr:`long int`." #: ../../c-api/arg.rst:270 ../../c-api/arg.rst:691 msgid "``k`` (:class:`int`) [unsigned long]" msgstr "``k`` (:class:`int`) [unsigned long]" #: ../../c-api/arg.rst:271 msgid "Convert a Python integer to a C :c:expr:`unsigned long`." msgstr "Konvertiere eine Python-Ganzzahl in einen C :c:expr:`unsigned long`." #: ../../c-api/arg.rst:273 ../../c-api/arg.rst:282 msgid "Use :meth:`~object.__index__` if available." msgstr "Verwende „ :meth:`~object.__index__` “, falls verfügbar." #: ../../c-api/arg.rst:276 ../../c-api/arg.rst:694 msgid "``L`` (:class:`int`) [long long]" msgstr "``L`` (:class:`int`) [long long]" #: ../../c-api/arg.rst:277 msgid "Convert a Python integer to a C :c:expr:`long long`." msgstr "Konvertiere eine Python-Ganzzahl in einen C :c:expr:`long long`." #: ../../c-api/arg.rst:279 ../../c-api/arg.rst:699 msgid "``K`` (:class:`int`) [unsigned long long]" msgstr "``K`` (:class:`int`) [unsigned long long]" #: ../../c-api/arg.rst:280 msgid "Convert a Python integer to a C :c:expr:`unsigned long long`." msgstr "" "Konvertiere eine Python-Ganzzahl in einen C :c:expr:`unsigned long long`." #: ../../c-api/arg.rst:285 ../../c-api/arg.rst:702 msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" msgstr "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" #: ../../c-api/arg.rst:286 msgid "Convert a Python integer to a C :c:type:`Py_ssize_t`." msgstr "Konvertiert eine Python-Ganzzahl in einen C- :c:type:`Py_ssize_t`." #: ../../c-api/arg.rst:288 msgid "``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]" msgstr "``c`` (:class:`bytes` oder :class:`bytearray` der Länge 1) [char]" #: ../../c-api/arg.rst:289 msgid "" "Convert a Python byte, represented as a :class:`bytes` or :class:`bytearray` " "object of length 1, to a C :c:expr:`char`." msgstr "" "Konvertiere ein Python-Byte, das als Objekt vom Typ „ :class:`bytes` “ oder " "„ :class:`bytearray` “ mit der Länge 1 dargestellt wird, in ein " "C- :c:expr:`char`." #: ../../c-api/arg.rst:292 msgid "Allow :class:`bytearray` objects." msgstr ":class:`bytearray`-Objekte zulassen." #: ../../c-api/arg.rst:295 ../../c-api/arg.rst:720 msgid "``C`` (:class:`str` of length 1) [int]" msgstr "``C`` (:class:`str`, Länge 1) [int]" #: ../../c-api/arg.rst:296 msgid "" "Convert a Python character, represented as a :class:`str` object of length " "1, to a C :c:expr:`int`." msgstr "" "Konvertiere ein Python-Zeichen, das als „ :class:`str` “-Objekt der Länge 1 " "dargestellt wird, in ein C- :c:expr:`int`." #: ../../c-api/arg.rst:299 ../../c-api/arg.rst:727 msgid "``f`` (:class:`float`) [float]" msgstr "``f`` (:class:`float`) [float]" #: ../../c-api/arg.rst:300 msgid "Convert a Python floating-point number to a C :c:expr:`float`." msgstr "Konvertiert eine Python-Gleitkommazahl in einen C- :c:expr:`float`." #: ../../c-api/arg.rst:302 ../../c-api/arg.rst:724 msgid "``d`` (:class:`float`) [double]" msgstr "``d`` (:class:`float`) [doppelt]" #: ../../c-api/arg.rst:303 msgid "Convert a Python floating-point number to a C :c:expr:`double`." msgstr "Konvertiert eine Python-Gleitkommazahl in einen C- :c:expr:`double`." #: ../../c-api/arg.rst:305 msgid "``D`` (:class:`complex`) [Py_complex]" msgstr "``D`` (:class:`complex`) [Py_complex]" #: ../../c-api/arg.rst:306 msgid "Convert a Python complex number to a C :c:type:`Py_complex` structure." msgstr "" "Konvertiert eine komplexe Zahl aus Python in eine C- :c:type:`Py_complex`-" "Struktur." #: ../../c-api/arg.rst:310 msgid "" "For unsigned integer formats ``B``, ``H``, ``I``, ``k`` and " "``K``, :exc:`DeprecationWarning` is emitted when the value is larger than " "the maximal value for the C type or less than the minimal value for the " "corresponding signed integer type of the same size." msgstr "" "Bei den Formaten für vorzeichenlose Ganzzahlen ``B``, ``H``, ``I``, ``k`` " "und ``K`` wird :exc:`DeprecationWarning` ausgegeben, wenn der Wert größer " "als der Maximalwert des C-Typs oder kleiner als der Minimalwert des " "entsprechenden vorzeichenbehafteten Ganzzahltyps gleicher Größe ist." #: ../../c-api/arg.rst:317 msgid "Other objects" msgstr "Sonstige Objekte" #: ../../c-api/arg.rst:319 ../../c-api/arg.rst:733 msgid "``O`` (object) [PyObject \\*]" msgstr "``O`` (Objekt) [PyObject \\*]" #: ../../c-api/arg.rst:320 msgid "" "Store a Python object (without any conversion) in a C object pointer. The C " "program thus receives the actual object that was passed. A " "new :term:`strong reference` to the object is not created (i.e. its " "reference count is not increased). The pointer stored is not ``NULL``." msgstr "" "Speichert ein Python-Objekt (ohne jegliche Konvertierung) in einem C-" "Objektzeiger. Das C-Programm erhält somit das tatsächlich übergebene Objekt. " "Es wird keine neue :term:`starke Referenz ` auf das Objekt " "erstellt (d.h., dessen Referenzzähler wird nicht erhöht). Der gespeicherte " "Zeiger ist kein ``NULL``." #: ../../c-api/arg.rst:326 msgid "``O!`` (object) [*typeobject*, PyObject \\*]" msgstr "``O!`` (Objekt) [*typeobject*, PyObject \\*]" #: ../../c-api/arg.rst:327 msgid "" "Store a Python object in a C object pointer. This is similar to ``O``, but " "takes two C arguments: the first is the address of a Python type object, the " "second is the address of the C variable (of type :c:expr:`PyObject*`) into " "which the object pointer is stored. If the Python object does not have the " "required type, :exc:`TypeError` is raised." msgstr "" "Speichert ein Python-Objekt in einem C-Objektzeiger. Dies ähnelt der " "Funktion ``O``, nimmt jedoch zwei C-Argumente entgegen: Das erste ist die " "Adresse eines Objekts vom Python-Typ, das zweite ist die Adresse der C-" "Variablen (vom Typ :c:expr:`PyObject*`), in der der Objektzeiger gespeichert " "wird. Wenn das Python-Objekt nicht den erforderlichen Typ aufweist, wird " "ein :exc:`TypeError` ausgelöst." #: ../../c-api/arg.rst:335 msgid "``O&`` (object) [*converter*, *address*]" msgstr "``O&`` (Objekt) [*Konverter*, *Adresse*]" #: ../../c-api/arg.rst:336 msgid "" "Convert a Python object to a C variable through a *converter* function. " "This takes two arguments: the first is a function, the second is the address " "of a C variable (of arbitrary type), converted to :c:expr:`void *`. The " "*converter* function in turn is called as follows::" msgstr "" "Konvertiert ein Python-Objekt mithilfe einer *converter*-Funktion in eine C-" "Variable. Diese Funktion benötigt zwei Argumente: Das erste ist eine " "Funktion, das zweite ist die Adresse einer C-Variablen (beliebigen Typs), " "die in :c:expr:`void *` konvertiert wurde. Die *converter*-Funktion wird " "wiederum wie folgt aufgerufen::" #: ../../c-api/arg.rst:341 msgid "status = converter(object, address);" msgstr "status = converter(object, address);" #: ../../c-api/arg.rst:343 msgid "" "where *object* is the Python object to be converted and *address* is " "the :c:expr:`void*` argument that was passed to the ``PyArg_Parse*`` " "function. The returned *status* should be ``1`` for a successful conversion " "and ``0`` if the conversion has failed. When the conversion fails, the " "*converter* function should raise an exception and leave the content of " "*address* unmodified." msgstr "" "Dabei ist *object* das zu konvertierende Python-Objekt und *address* das " "Argument „ :c:expr:`void*` “, das an die Funktion „ ``PyArg_Parse*`` " "“ übergeben wurde. Der zurückgegebene Wert *status* sollte bei erfolgreicher " "Konvertierung „ ``1`` “ lauten und bei fehlgeschlagener Konvertierung " "„ ``0`` “. Wenn die Konvertierung fehlschlägt, sollte die Funktion " "*converter* eine Ausnahme auslösen und den Inhalt von *address* unverändert " "lassen." #: ../../c-api/arg.rst:352 msgid "" "If the *converter* returns :c:macro:`!Py_CLEANUP_SUPPORTED`, it may get " "called a second time if the argument parsing eventually fails, giving the " "converter a chance to release any memory that it had already allocated. In " "this second call, the *object* parameter will be ``NULL``; *address* will " "have the same value as in the original call." msgstr "" "Wenn der *Konverter* „ :c:macro:`!Py_CLEANUP_SUPPORTED` “ zurückgibt, wird " "er möglicherweise ein zweites Mal aufgerufen, falls die Analyse des " "Arguments letztendlich fehlschlägt. Dadurch erhält der Konverter die " "Möglichkeit, bereits zugewiesenen Speicher wieder freizugeben. Bei diesem " "zweiten Aufruf ist der Parameter *object* gleich „ ``NULL`` “; *address* hat " "denselben Wert wie beim ursprünglichen Aufruf." #: ../../c-api/arg.rst:358 msgid "" "Examples of converters: :c:func:`PyUnicode_FSConverter` " "and :c:func:`PyUnicode_FSDecoder`." msgstr "" "Beispiele für Umrechner: :c:func:`PyUnicode_FSConverter` " "und :c:func:`PyUnicode_FSDecoder`." #: ../../c-api/arg.rst:361 msgid ":c:macro:`!Py_CLEANUP_SUPPORTED` was added." msgstr ":c:macro:`!Py_CLEANUP_SUPPORTED` wurde hinzugefügt." #: ../../c-api/arg.rst:364 ../../c-api/arg.rst:705 msgid "``p`` (:class:`bool`) [int]" msgstr "``p`` (:class:`bool`) [int]" #: ../../c-api/arg.rst:365 msgid "" "Tests the value passed in for truth (a boolean **p**\\ redicate) and " "converts the result to its equivalent C true/false integer value. Sets the " "int to ``1`` if the expression was true and ``0`` if it was false. This " "accepts any valid Python value. See :ref:`truth` for more information about " "how Python tests values for truth." msgstr "" "Prüft den übergebenen Wert auf Wahrheitswert (ein boolesches **p**\\ " "Prädikat) und wandelt das Ergebnis in den entsprechenden C-Ganzzahlwert für " "„true“ bzw. „false“ um. Setzt den int-Wert auf „ ``1`` “, wenn der Ausdruck " "wahr war, und auf „ ``0`` “, wenn er falsch war. Hierfür sind alle gültigen " "Python-Werte zulässig. Weitere Informationen dazu, wie Python Werte auf " "ihren Wahrheitswert prüft, findest du unter :ref:`truth`." #: ../../c-api/arg.rst:373 msgid "``(items)`` (sequence) [*matching-items*]" msgstr "``(items)`` (Sequenz) [*übereinstimmende Elemente*]" #: ../../c-api/arg.rst:374 msgid "" "The object must be a Python sequence (except :class:`str`, :class:`bytes` " "or :class:`bytearray`) whose length is the number of format units in " "*items*. The C arguments must correspond to the individual format units in " "*items*. Format units for sequences may be nested." msgstr "" "Das Objekt muss eine Python-Sequenz sein (mit Ausnahme " "von :class:`str`, :class:`bytes` oder :class:`bytearray`), deren Länge der " "Anzahl der Formateinheiten in *items* entspricht. Die C-Argumente müssen den " "einzelnen Formateinheiten in *items* entsprechen. Formateinheiten für " "Sequenzen können verschachtelt sein." #: ../../c-api/arg.rst:379 msgid "" "If *items* contains format units which store a :ref:`borrowed buffer ` (``s``, ``s#``, ``z``, ``z#``, ``y``, or ``y#``) or " "a :term:`borrowed reference` (``S``, ``Y``, ``U``, ``O``, or ``O!``), the " "object must be a Python tuple. The *converter* for the ``O&`` format unit in " "*items* must not store a borrowed buffer or a borrowed reference." msgstr "" "Wenn *items* Formateinheiten enthält, die einen :ref:`ausgeliehenen Puffer " "` (``s``, ``s#``, ``z``, ``z#``, ``y`` oder ``y#``) " "oder eine :term:`ausgeliehene Referenz ` (``S``, ``Y``, " "``U``, ``O`` oder ``O!``) speichern, muss das Objekt ein Python-Tupel sein. " "Der *Konverter* für die Einheit im Format „ ``O&`` “ in *items* darf keinen " "ausgeliehenen Puffer oder eine ausgeliehene Referenz speichern." #: ../../c-api/arg.rst:386 msgid "" ":class:`str` and :class:`bytearray` objects no longer accepted as a sequence." msgstr "" ":class:`str` und Objekte vom Typ „ :class:`bytearray` “ werden nicht mehr " "als Sequenz akzeptiert." #: ../../c-api/arg.rst:389 msgid "" "Non-tuple sequences are deprecated if *items* contains format units which " "store a borrowed buffer or a borrowed reference." msgstr "" "Nicht-Tupel-Sequenzen sind veraltet, wenn *items* Format-Einheiten enthält, " "die einen ausgeliehenen Puffer oder eine ausgeliehene Referenz speichern." #: ../../c-api/arg.rst:393 msgid "" "A few other characters have a meaning in a format string. These may not " "occur inside nested parentheses. They are:" msgstr "" "Einige weitere Zeichen haben in einer Formatzeichenfolge eine bestimmte " "Bedeutung. Diese dürfen nicht innerhalb verschachtelter Klammern vorkommen. " "Es handelt sich dabei um folgende Zeichen:" #: ../../c-api/arg.rst:396 msgid "``|``" msgstr "``|``" #: ../../c-api/arg.rst:397 msgid "" "Indicates that the remaining arguments in the Python argument list are " "optional. The C variables corresponding to optional arguments should be " "initialized to their default value --- when an optional argument is not " "specified, :c:func:`PyArg_ParseTuple` does not touch the contents of the " "corresponding C variable(s). For example, the format string ``\"OO|OO\"`` " "corresponds to the Python signature ``f(a, b, c=None, d=None)``." msgstr "" "Gibt an, dass die verbleibenden Argumente in der Python-Argumentliste " "optional sind. Die den optionalen Argumenten entsprechenden C-Variablen " "sollten auf ihren Standardwert initialisiert werden – wenn ein optionales " "Argument nicht angegeben wird, greift „ :c:func:`PyArg_ParseTuple` “ den " "Inhalt der entsprechenden C-Variablen nicht an. Beispielsweise entspricht " "die Formatzeichenfolge „ ``\"OO|OO\"`` “ der Python-Signatur „ ``f(a, b, " "c=None, d=None)`` “." #: ../../c-api/arg.rst:405 msgid "``$``" msgstr "``$``" #: ../../c-api/arg.rst:406 msgid "" ":c:func:`PyArg_ParseTupleAndKeywords` only: Indicates that the remaining " "arguments in the Python argument list are keyword-only. They are optional if " "``|`` was specified before ``$``, and required otherwise. ``|`` cannot be " "specified after ``$``. For example, the format string ``\"O|O$O\"`` " "corresponds to the Python signature ``f(a, b=None, *, c=None)``, and the " "format string ``\"OO$OO\"`` corresponds to ``f(a, b, *, c, d)``." msgstr "" ":c:func:`PyArg_ParseTupleAndKeywords` only: Gibt an, dass die verbleibenden " "Argumente in der Python-Argumentliste ausschließlich als Schlüsselwörter " "verwendet werden können. Sie sind optional, wenn „ ``|`` “ vor „ ``$`` " "“ angegeben wurde, andernfalls sind sie erforderlich. „ ``|`` “ kann nicht " "nach „ ``$`` “ angegeben werden. Beispielsweise entspricht die " "Formatzeichenfolge „ ``\"O|O$O\"`` “ der Python-Signatur „ ``f(a, b=None, *, " "c=None)`` “, und die Formatzeichenfolge „ ``\"OO$OO\"`` “ entspricht " "„ ``f(a, b, *, c, d)`` “." #: ../../c-api/arg.rst:417 msgid "``:``" msgstr "``:``" #: ../../c-api/arg.rst:418 msgid "" "The list of format units ends here; the string after the colon is used as " "the function name in error messages (the \"associated value\" of the " "exception that :c:func:`PyArg_ParseTuple` raises)." msgstr "" "Die Liste der Formateinheiten endet hier. Die Zeichenfolge nach dem " "Doppelpunkt wird in Fehlermeldungen als Funktionsname verwendet (der " "„zugeordnete Wert“ der Ausnahme, die von :c:func:`PyArg_ParseTuple` " "ausgelöst wird)." #: ../../c-api/arg.rst:422 msgid "``;``" msgstr "``;``" #: ../../c-api/arg.rst:423 msgid "" "The list of format units ends here; the string after the semicolon is used " "as the error message *instead* of the default error message. ``:`` and " "``;`` mutually exclude each other." msgstr "" "Die Liste der Formateinheiten endet hier. Die Zeichenfolge nach dem " "Semikolon wird *anstelle* der Standardfehlermeldung als Fehlermeldung " "verwendet. „ ``:`` “ und „ ``;`` “ schließen sich gegenseitig aus." #: ../../c-api/arg.rst:427 msgid "" "Note that any Python object references which are provided to the caller are " "*borrowed* references; do not release them (i.e. do not decrement their " "reference count)!" msgstr "" "Beachte, dass es sich bei allen Python-Objektreferenzen, die dem Aufrufer " "übergeben werden, um *ausgeliehene* Referenzen handelt. Gib diese nicht frei " "(d.h., verringere nicht deren Referenzanzahl)!" #: ../../c-api/arg.rst:431 msgid "" "Additional arguments passed to these functions must be addresses of " "variables whose type is determined by the format string; these are used to " "store values from the input tuple. There are a few cases, as described in " "the list of format units above, where these parameters are used as input " "values; they should match what is specified for the corresponding format " "unit in that case." msgstr "" "Zusätzliche Argumente, die an diese Funktionen übergeben werden, müssen " "Adressen von Variablen sein, deren Typ durch die Formatzeichenfolge bestimmt " "wird. Diese dienen dazu, Werte aus dem Eingabetupel zu speichern. Es gibt " "einige wenige Fälle – wie in der obigen Liste der Formateinheiten " "beschrieben –, in denen diese Parameter als Eingabewerte verwendet werden. " "In diesem Fall sollten sie mit den Angaben für die entsprechende " "Formateinheit übereinstimmen." #: ../../c-api/arg.rst:437 msgid "" "For the conversion to succeed, the *arg* object must match the format and " "the format must be exhausted. On success, the ``PyArg_Parse*`` functions " "return true, otherwise they return false and raise an appropriate exception. " "When the ``PyArg_Parse*`` functions fail due to conversion failure in one of " "the format units, the variables at the addresses corresponding to that and " "the following format units are left untouched." msgstr "" "Damit die Konvertierung erfolgreich ist, muss das *arg*-Objekt dem Format " "entsprechen und das Format muss vollständig ausgeschöpft sein. Bei Erfolg " "geben die Funktionen „ ``PyArg_Parse*`` “ den Wert „true“ zurück, " "andernfalls geben sie „false“ zurück und lösen eine entsprechende Ausnahme " "aus. Wenn die Funktionen „ ``PyArg_Parse*`` “ aufgrund eines " "Konvertierungsfehlers in einer der Formateinheiten fehlschlagen, bleiben die " "Variablen an den Adressen, die dieser und den folgenden Formateinheiten " "entsprechen, unverändert." #: ../../c-api/arg.rst:446 msgid "API Functions" msgstr "API-Funktionen" #: ../../c-api/arg.rst:450 msgid "" "Parse the parameters of a function that takes only positional parameters " "into local variables. Returns true on success; on failure, it returns false " "and raises the appropriate exception." msgstr "" "Die Parameter einer Funktion, die ausschließlich Positionsparameter " "akzeptiert, werden in lokale Variablen umgewandelt. Bei Erfolg wird „true“ " "zurückgegeben. Bei einem Fehler wird „false“ zurückgegeben und die " "entsprechende Ausnahme ausgelöst." #: ../../c-api/arg.rst:457 msgid "" "Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list " "rather than a variable number of arguments." msgstr "" "Entspricht der Funktion „ :c:func:`PyArg_ParseTuple` “, mit dem Unterschied, " "dass hier anstelle einer variablen Anzahl von Argumenten ein `va_list`-" "Argument übergeben wird." #: ../../c-api/arg.rst:463 msgid "" "Parse the parameters of a function that takes both positional and keyword " "parameters into local variables. The *keywords* argument is a ``NULL``-" "terminated array of keyword parameter names specified as null-terminated " "ASCII or UTF-8 encoded C strings. Empty names denote :ref:`positional-only " "parameters `. Returns true on success; on " "failure, it returns false and raises the appropriate exception." msgstr "" "Die Parameter einer Funktion, die sowohl Positions- als auch " "Schlüsselwortparameter akzeptiert, in lokale Variablen umwandeln. Das " "Argument *keywords* ist ein mit „ ``NULL`` “ abgeschlossenes Array von " "Schlüsselwort-Parameternamen, die als null-terminierte ASCII- oder UTF-8-" "kodierte C-Zeichenketten angegeben sind. Leere Namen bezeichnen :ref:`rein " "positionale Parameter `. Gibt bei Erfolg „true“ " "zurück. Bei einem Fehler gibt sie „false“ zurück und löst die entsprechende " "Ausnahme aus." #: ../../c-api/arg.rst:474 msgid "" "The *keywords* parameter declaration is :c:expr:`char * const *` in C " "and :c:expr:`const char * const *` in C++. This can be overridden with " "the :c:macro:`PY_CXX_CONST` macro." msgstr "" "Die Parameterdeklaration für *keywords* lautet in C :c:expr:`char * const *` " "und in C++ :c:expr:`const char * const *`. Dies kann mit dem Makro " "„ :c:macro:`PY_CXX_CONST` “ überschrieben werden." #: ../../c-api/arg.rst:478 msgid "" "Added support for :ref:`positional-only parameters `." msgstr "" "Unterstützung für :ref:`rein positionale Parameter ` wurde hinzugefügt." #: ../../c-api/arg.rst:482 msgid "" "The *keywords* parameter has now type :c:expr:`char * const *` in C " "and :c:expr:`const char * const *` in C++, instead of :c:expr:`char **`. " "Added support for non-ASCII keyword parameter names." msgstr "" "Der Parameter *keywords* hat nun in C den Typ :c:expr:`char * const *` und " "in C++ den Typ :c:expr:`const char * const *` anstelle von :c:expr:`char " "**`. Es wurde Unterstützung für Nicht-ASCII-Namen von " "Schlüsselwortparametern hinzugefügt." #: ../../c-api/arg.rst:491 msgid "" "Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a " "va_list rather than a variable number of arguments." msgstr "" "Entspricht der Funktion „ :c:func:`PyArg_ParseTupleAndKeywords` “, mit dem " "Unterschied, dass hier anstelle einer variablen Anzahl von Argumenten ein " "„va_list“-Argument übergeben wird." #: ../../c-api/arg.rst:497 msgid "" "Ensure that the keys in the keywords argument dictionary are strings. This " "is only needed if :c:func:`PyArg_ParseTupleAndKeywords` is not used, since " "the latter already does this check." msgstr "" "Stellt sicher, dass die Schlüssel im Dictionary der Schlüsselwortargumente " "Zeichenketten sind. Das ist nur nötig, " "wenn :c:func:`PyArg_ParseTupleAndKeywords` nicht verwendet wird, da diese " "Funktion die Prüfung bereits durchführt." #: ../../c-api/arg.rst:506 msgid "" "Parse the parameter of a function that takes a single positional parameter " "into a local variable. Returns true on success; on failure, it returns " "false and raises the appropriate exception." msgstr "" "Wertet den Parameter einer Funktion, die einen einzelnen Positionsparameter " "entgegennimmt, in eine lokale Variable aus. Gibt bei Erfolg „true“ zurück. " "Bei einem Fehler wird „false“ zurückgegeben und die entsprechende Ausnahme " "ausgelöst." #: ../../c-api/arg.rst:510 msgid "Example::" msgstr "Beispiel::" #: ../../c-api/arg.rst:512 msgid "" "// Function using METH_O calling convention\n" "static PyObject*\n" "my_function(PyObject *module, PyObject *arg)\n" "{\n" " int value;\n" " if (!PyArg_Parse(arg, \"i:my_function\", &value)) {\n" " return NULL;\n" " }\n" " // ... use value ...\n" "}" msgstr "" "// Funktion mit der Aufrufkonvention METH_O\n" "static PyObject*\n" "my_function(PyObject *module, PyObject *arg)\n" "{\n" " int value;\n" " if (!PyArg_Parse(arg, \"i:my_function\", &value)) {\n" " return NULL;\n" " }\n" " // ... value verwenden ...\n" "}" #: ../../c-api/arg.rst:526 msgid "" "Parse the parameters of a function that takes only array parameters into " "local variables (that is, a function using the :c:macro:`METH_FASTCALL` " "calling convention). Returns true on success; on failure, it returns false " "and raises the appropriate exception." msgstr "" "Die Parameter einer Funktion, die ausschließlich Array-Parameter akzeptiert, " "werden in lokale Variablen umgewandelt (also einer Funktion, die die " "Aufrufkonvention :c:macro:`METH_FASTCALL` verwendet). Bei Erfolg wird „true“ " "zurückgegeben. Bei einem Fehler wird „false“ zurückgegeben und die " "entsprechende Ausnahme ausgelöst." #: ../../c-api/arg.rst:537 msgid "" "Parse the parameters of a function that takes both array and keyword " "parameters into local variables (that is, a function using " "the :c:macro:`METH_FASTCALL` ``|`` :c:macro:`METH_KEYWORDS` calling " "convention). Returns true on success; on failure, it returns false and " "raises the appropriate exception." msgstr "" "Die Parameter einer Funktion, die sowohl Array- als auch " "Schlüsselwortparameter akzeptiert, werden in lokale Variablen umgewandelt " "(also einer Funktion, die die Aufrufkonvention :c:macro:`METH_FASTCALL` ``|" "`` :c:macro:`METH_KEYWORDS` verwendet). Bei Erfolg wird „true“ " "zurückgegeben. Bei einem Fehler wird „false“ zurückgegeben und die " "entsprechende Ausnahme ausgelöst." #: ../../c-api/arg.rst:548 msgid "" "A simpler form of parameter retrieval which does not use a format string to " "specify the types of the arguments. Functions which use this method to " "retrieve their parameters should be declared as :c:macro:`METH_VARARGS` in " "function or method tables. The tuple containing the actual parameters " "should be passed as *args*; it must actually be a tuple. The length of the " "tuple must be at least *min* and no more than *max*; *min* and *max* may be " "equal. Additional arguments must be passed to the function, each of which " "should be a pointer to a :c:expr:`PyObject*` variable; these will be filled " "in with the values from *args*; they will contain :term:`borrowed references " "`. The variables which correspond to optional parameters " "not given by *args* will not be filled in; these should be initialized by " "the caller. This function returns true on success and false if *args* is not " "a tuple or contains the wrong number of elements; an exception will be set " "if there was a failure." msgstr "" "Eine einfachere Form der Parameterübernahme, die keine Formatzeichenkette " "zur Angabe der Argumenttypen verwendet. Funktionen, die ihre Parameter auf " "diese Weise übernehmen, sollten in Funktions- oder Methodentabellen " "als :c:macro:`METH_VARARGS` deklariert werden. Das Tupel mit den " "tatsächlichen Parametern wird als *args* übergeben. Es muss wirklich ein " "Tupel sein. Die Länge des Tupels muss mindestens *min* und höchstens *max* " "betragen, wobei *min* und *max* gleich sein dürfen. Zusätzlich müssen der " "Funktion weitere Argumente übergeben werden, die jeweils ein Zeiger auf eine " "Variable vom Typ :c:expr:`PyObject*` sein müssen. Diese werden mit den " "Werten aus *args* gefüllt und enthalten :term:`geliehene Referenzen " "`. Die Variablen, die optionalen und in *args* nicht " "angegebenen Parametern entsprechen, werden nicht gefüllt. Sie sollten vom " "Aufrufer initialisiert werden. Diese Funktion gibt „wahr“ zurück, wenn sie " "erfolgreich war, und „falsch“, wenn *args* kein Tupel ist oder die falsche " "Anzahl an Elementen enthält. Im Fehlerfall wird eine Ausnahme gesetzt." #: ../../c-api/arg.rst:563 msgid "" "This is an example of the use of this function, taken from the sources for " "the :mod:`!_weakref` helper module for weak references::" msgstr "" "Hier ist ein Beispiel für die Verwendung dieser Funktion, das aus dem " "Quellcode des Hilfsmoduls „ :mod:`!_weakref` “ für schwache Referenzen " "stammt::" #: ../../c-api/arg.rst:566 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 "" "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" "}" #: ../../c-api/arg.rst:579 msgid "" "The call to :c:func:`PyArg_UnpackTuple` in this example is entirely " "equivalent to this call to :c:func:`PyArg_ParseTuple`::" msgstr "" "Der Aufruf von „ :c:func:`PyArg_UnpackTuple` “ in diesem Beispiel entspricht " "vollständig dem folgenden Aufruf von „ :c:func:`PyArg_ParseTuple` “ ::" #: ../../c-api/arg.rst:582 msgid "PyArg_ParseTuple(args, \"O|O:ref\", &object, &callback)" msgstr "PyArg_ParseTuple(args, \"O|O:ref\", &object, &callback)" #: ../../c-api/arg.rst:586 msgid "" "The value to be inserted, if any, before :c:expr:`char * const *` in the " "*keywords* parameter declaration of :c:func:`PyArg_ParseTupleAndKeywords` " "and :c:func:`PyArg_VaParseTupleAndKeywords`. Default empty for C and " "``const`` for C++ (:c:expr:`const char * const *`). To override, define it " "to the desired value before including :file:`Python.h`." msgstr "" "Der Wert, der gegebenenfalls vor :c:expr:`char * const *` in der " "Parameterdeklaration *keywords* von :c:func:`PyArg_ParseTupleAndKeywords` " "und :c:func:`PyArg_VaParseTupleAndKeywords` eingefügt werden soll. " "Standardmäßig leer für C und ``const`` für C++ (:c:expr:`const char * const " "*`). Um diesen Wert zu überschreiben, definiere ihn vor dem Einbinden " "von :file:`Python.h` auf den gewünschten Wert." #: ../../c-api/arg.rst:600 msgid "Building values" msgstr "Werte schaffen" #: ../../c-api/arg.rst:604 msgid "" "Create a new value based on a format string similar to those accepted by the " "``PyArg_Parse*`` family of functions and a sequence of values. Returns the " "value or ``NULL`` in the case of an error; an exception will be raised if " "``NULL`` is returned." msgstr "" "Erstellt einen neuen Wert auf der Grundlage einer Formatzeichenfolge, die " "den von der Funktionsfamilie „ ``PyArg_Parse*`` “ akzeptierten " "Formatzeichenfolgen ähnelt, sowie einer Folge von Werten. Gibt den Wert " "zurück oder im Fehlerfall „ ``NULL`` “. Wird „ ``NULL`` “ zurückgegeben, " "wird eine Ausnahme ausgelöst." #: ../../c-api/arg.rst:609 msgid "" ":c:func:`Py_BuildValue` does not always build a tuple. It builds a tuple " "only if its format string contains two or more format units. If the format " "string is empty, it returns ``None``; if it contains exactly one format " "unit, it returns whatever object is described by that format unit. To force " "it to return a tuple of size 0 or one, parenthesize the format string." msgstr "" ":c:func:`Py_BuildValue` Erzeugt nicht immer ein Tupel. Es erzeugt nur dann " "ein Tupel, wenn seine Formatzeichenfolge zwei oder mehr Formateinheiten " "enthält. Ist die Formatzeichenfolge leer, gibt es „ ``None`` “ zurück. " "Enthält sie genau eine Formateinheit, gibt es das Objekt zurück, das durch " "diese Formateinheit beschrieben wird. Um die Rückgabe eines Tupels der " "Größe 0 oder 1 zu erzwingen, setze die Formatzeichenfolge in Klammern." #: ../../c-api/arg.rst:615 msgid "" "When memory buffers are passed as parameters to supply data to build " "objects, as for the ``s`` and ``s#`` formats, the required data is copied. " "Buffers provided by the caller are never referenced by the objects created " "by :c:func:`Py_BuildValue`. In other words, if your code " "invokes :c:func:`malloc` and passes the allocated memory " "to :c:func:`Py_BuildValue`, your code is responsible for " "calling :c:func:`free` for that memory once :c:func:`Py_BuildValue` returns." msgstr "" "Wenn Speicherpuffer als Parameter übergeben werden, um Daten für die " "Erstellung von Objekten bereitzustellen – wie beispielsweise bei den " "Formaten ``s`` und ``s#`` –, werden die erforderlichen Daten kopiert. Auf " "die vom Aufrufer bereitgestellten Puffer wird von den " "mit :c:func:`Py_BuildValue` erstellten Objekten niemals verwiesen. Mit " "anderen Worten: Wenn dein Code :c:func:`malloc` aufruft und den zugewiesenen " "Speicher an :c:func:`Py_BuildValue` übergibt, ist dein Code dafür " "verantwortlich, :c:func:`free` für diesen Speicher aufzurufen, " "sobald :c:func:`Py_BuildValue` zurückkehrt." #: ../../c-api/arg.rst:623 msgid "" "In the following description, the quoted form is the format unit; the entry " "in (round) parentheses is the Python object type that the format unit will " "return; and the entry in [square] brackets is the type of the C value(s) to " "be passed." msgstr "" "In der folgenden Beschreibung ist die in Anführungszeichen gesetzte Form die " "Formateinheit. Der Eintrag in (runden) Klammern ist der Python-Objekttyp, " "den die Formateinheit zurückgibt und der Eintrag in [eckigen] Klammern ist " "der Typ des bzw. der zu übergebenden C-Werte." #: ../../c-api/arg.rst:627 msgid "" "The characters space, tab, colon and comma are ignored in format strings " "(but not within format units such as ``s#``). This can be used to make long " "format strings a tad more readable." msgstr "" "Die Zeichen Leerzeichen, Tabulator, Doppelpunkt und Komma werden in " "Formatzeichenfolgen ignoriert (jedoch nicht innerhalb von Formateinheiten " "wie ``s#``). Dies kann genutzt werden, um lange Formatzeichenfolgen etwas " "lesbarer zu gestalten." #: ../../c-api/arg.rst:631 msgid "``s`` (:class:`str` or ``None``) [const char \\*]" msgstr "``s`` (:class:`str` oder ``None``) [const char \\*]" #: ../../c-api/arg.rst:632 msgid "" "Convert a null-terminated C string to a Python :class:`str` object using " "``'utf-8'`` encoding. If the C string pointer is ``NULL``, ``None`` is used." msgstr "" "Konvertiert eine null-terminierte C-Zeichenkette mithilfe der „ ``'utf-8'`` " "“-Kodierung in ein Python-Objekt vom Typ „ :class:`str` “. Wenn der Zeiger " "auf die C-Zeichenkette vom Typ „ ``NULL`` “ ist, wird „ ``None`` “ verwendet." #: ../../c-api/arg.rst:635 msgid "" "``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" "``s#`` (:class:`str` oder ``None``) [const char \\*, :c:type:`Py_ssize_t`]" #: ../../c-api/arg.rst:636 msgid "" "Convert a C string and its length to a Python :class:`str` object using " "``'utf-8'`` encoding. If the C string pointer is ``NULL``, the length is " "ignored and ``None`` is returned." msgstr "" "Konvertiert eine C-Zeichenkette und deren Länge mithilfe der „ ``'utf-8'`` “-" "Kodierung in ein Python-Objekt vom Typ „ :class:`str` “. Ist der Zeiger auf " "die C-Zeichenkette von Typ „ ``NULL`` “, wird die Länge ignoriert und " "„ ``None`` “ zurückgegeben." #: ../../c-api/arg.rst:640 msgid "``y`` (:class:`bytes`) [const char \\*]" msgstr "``y`` (:class:`bytes`) [const char \\*]" #: ../../c-api/arg.rst:641 msgid "" "This converts a C string to a Python :class:`bytes` object. If the C string " "pointer is ``NULL``, ``None`` is returned." msgstr "" "Dies wandelt eine C-Zeichenkette in ein Python-Objekt vom Typ " "„ :class:`bytes` “ um. Wenn der Zeiger auf die C-Zeichenkette auf „ ``NULL`` " "“ verweist, wird „ ``None`` “ zurückgegeben." #: ../../c-api/arg.rst:644 msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" #: ../../c-api/arg.rst:645 msgid "" "This converts a C string and its lengths to a Python object. If the C " "string pointer is ``NULL``, ``None`` is returned." msgstr "" "Dies wandelt eine C-Zeichenkette und deren Länge in ein Python-Objekt um. " "Wenn der Zeiger auf die C-Zeichenkette auf „ ``NULL`` “ verweist, wird " "„ ``None`` “ zurückgegeben." #: ../../c-api/arg.rst:649 ../../c-api/arg.rst:665 msgid "Same as ``s``." msgstr "Genau wie unter ``s``." #: ../../c-api/arg.rst:651 msgid "" "``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" "``z#`` (:class:`str` oder ``None``) [const char \\*, :c:type:`Py_ssize_t`]" #: ../../c-api/arg.rst:652 ../../c-api/arg.rst:668 msgid "Same as ``s#``." msgstr "Genau wie unter ``s#``." #: ../../c-api/arg.rst:654 msgid "``u`` (:class:`str`) [const wchar_t \\*]" msgstr "``u`` (:class:`str`) [const wchar_t \\*]" #: ../../c-api/arg.rst:655 msgid "" "Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or " "UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is " "``NULL``, ``None`` is returned." msgstr "" "Konvertiert einen null-terminierten :c:type:`wchar_t`-Puffer mit Unicode-" "Daten (UTF-16 oder UCS-4) in ein Python-Unicode-Objekt. Wenn der Zeiger auf " "den Unicode-Puffer auf ``NULL`` verweist, wird ``None`` zurückgegeben." #: ../../c-api/arg.rst:659 msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" msgstr "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" #: ../../c-api/arg.rst:660 msgid "" "Convert a Unicode (UTF-16 or UCS-4) data buffer and its length to a Python " "Unicode object. If the Unicode buffer pointer is ``NULL``, the length is " "ignored and ``None`` is returned." msgstr "" "Konvertiert einen Unicode-Datenpuffer (UTF-16 oder UCS-4) und dessen Länge " "in ein Python-Unicode-Objekt. Wenn der Zeiger auf den Unicode-Puffer auf " "``NULL`` verweist, wird die Länge ignoriert und ``None`` zurückgegeben." #: ../../c-api/arg.rst:664 msgid "``U`` (:class:`str` or ``None``) [const char \\*]" msgstr "``U`` (:class:`str` oder ``None``) [const char \\*]" #: ../../c-api/arg.rst:667 msgid "" "``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" "``U#`` (:class:`str` oder ``None``) [const char \\*, :c:type:`Py_ssize_t`]" #: ../../c-api/arg.rst:671 msgid "Convert a plain C :c:expr:`int` to a Python integer object." msgstr "" "Konvertiert eine einfache C- :c:expr:`int`-Variable in ein Python-Integer-" "Objekt." #: ../../c-api/arg.rst:673 msgid "``b`` (:class:`int`) [char]" msgstr "``b`` (:class:`int`) [Zeichen]" #: ../../c-api/arg.rst:674 msgid "Convert a plain C :c:expr:`char` to a Python integer object." msgstr "" "Konvertiert eine einfache C- :c:expr:`char` e in ein Python-Integer-Objekt." #: ../../c-api/arg.rst:677 msgid "Convert a plain C :c:expr:`short int` to a Python integer object." msgstr "" "Konvertiert einen einfachen C-Ausdruck :c:expr:`short int` in ein Python-" "Ganzzahlobjekt." #: ../../c-api/arg.rst:680 msgid "Convert a C :c:expr:`long int` to a Python integer object." msgstr "Wandelt ein C-:c:expr:`long int` in ein Python-Integer-Objekt um." #: ../../c-api/arg.rst:683 msgid "Convert a C :c:expr:`unsigned char` to a Python integer object." msgstr "" "Konvertiert ein C-Objekt vom Typ :c:expr:`unsigned char` in ein Python-" "Integer-Objekt." #: ../../c-api/arg.rst:686 msgid "Convert a C :c:expr:`unsigned short int` to a Python integer object." msgstr "" "Konvertiert ein C-Objekt vom Typ :c:expr:`unsigned short int` in ein Python-" "Integer-Objekt." #: ../../c-api/arg.rst:689 msgid "Convert a C :c:expr:`unsigned int` to a Python integer object." msgstr "" "Konvertiert ein C-Objekt vom Typ :c:expr:`unsigned int` in ein Python-" "Integer-Objekt." #: ../../c-api/arg.rst:692 msgid "Convert a C :c:expr:`unsigned long` to a Python integer object." msgstr "" "Konvertiert ein C-Objekt vom Typ :c:expr:`unsigned long` in ein Python-" "Integer-Objekt." #: ../../c-api/arg.rst:695 msgid "Convert a C :c:expr:`long long` to a Python integer object." msgstr "Wandelt ein C-:c:expr:`long long` in ein Python-Integer-Objekt um." #: ../../c-api/arg.rst:700 msgid "Convert a C :c:expr:`unsigned long long` to a Python integer object." msgstr "" "Wandelt ein C-:c:expr:`unsigned long long` in ein Python-Integer-Objekt um." #: ../../c-api/arg.rst:703 msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." msgstr "Konvertiert eine C- :c:type:`Py_ssize_t`-Zahl in eine Python-Ganzzahl." #: ../../c-api/arg.rst:706 msgid "Convert a C :c:expr:`int` to a Python :class:`bool` object." msgstr "" "Konvertiert ein C- :c:expr:`int`-Objekt in ein Python- :class:`bool`-Objekt." #: ../../c-api/arg.rst:708 msgid "" "Be aware that this format requires an ``int`` argument. Unlike most other " "contexts in C, variadic arguments are not coerced to a suitable type " "automatically. You can convert another type (for example, a pointer or a " "float) to a suitable ``int`` value using ``(x) ? 1 : 0`` or ``!!x``." msgstr "" "Beachte, dass dieses Format ein Argument vom Typ „ ``int`` “ erfordert. " "Anders als in den meisten anderen Kontexten in C werden variadische " "Argumente nicht automatisch in einen geeigneten Typ umgewandelt. Du kannst " "einen anderen Typ (beispielsweise einen Zeiger oder einen „float“) mithilfe " "von „ ``(x) ? 1 : 0`` “ oder „ ``!!x`` “ in einen geeigneten Wert vom Typ " "„ ``int`` “ umwandeln." #: ../../c-api/arg.rst:716 msgid "``c`` (:class:`bytes` of length 1) [char]" msgstr "``c`` (:class:`bytes`, Länge 1) [char]" #: ../../c-api/arg.rst:717 msgid "" "Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` " "object of length 1." msgstr "" "Konvertiere ein C- :c:expr:`int`, das ein Byte darstellt, in ein " "Python- :class:`bytes`-Objekt der Länge 1." #: ../../c-api/arg.rst:721 msgid "" "Convert a C :c:expr:`int` representing a character to Python :class:`str` " "object of length 1." msgstr "" "Konvertiere ein C- :c:expr:`int`, das ein Zeichen darstellt, in ein " "Python- :class:`str`-Objekt der Länge 1." #: ../../c-api/arg.rst:725 msgid "Convert a C :c:expr:`double` to a Python floating-point number." msgstr "" "Konvertiert eine C- :c:expr:`double`-Zahl in eine Python-Gleitkommazahl." #: ../../c-api/arg.rst:728 msgid "Convert a C :c:expr:`float` to a Python floating-point number." msgstr "" "Konvertiert eine C- :c:expr:`float`-Zahl in eine Python-Gleitkommazahl." #: ../../c-api/arg.rst:730 msgid "``D`` (:class:`complex`) [Py_complex \\*]" msgstr "``D`` (:class:`complex`) [Py_complex \\*]" #: ../../c-api/arg.rst:731 msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." msgstr "" "Konvertiert eine C- :c:type:`Py_complex`-Struktur in eine komplexe Zahl in " "Python." #: ../../c-api/arg.rst:734 msgid "" "Pass a Python object untouched but create a new :term:`strong reference` to " "it (i.e. its reference count is incremented by one). If the object passed in " "is a ``NULL`` pointer, it is assumed that this was caused because the call " "producing the argument found an error and set an exception. " "Therefore, :c:func:`Py_BuildValue` will return ``NULL`` but won't raise an " "exception. If no exception has been raised yet, :exc:`SystemError` is set." msgstr "" "Ein Python-Objekt unverändert übergeben, aber eine neue :term:`starke " "Referenz ` darauf erstellen (d.h., seine Referenzanzahl " "wird um eins erhöht). Handelt es sich bei dem übergebenen Objekt um einen " "Zeiger vom Typ „ ``NULL`` “, wird davon ausgegangen, dass dies darauf " "zurückzuführen ist, dass der Aufruf, der das Argument erzeugt hat, einen " "Fehler festgestellt und eine Ausnahme ausgelöst hat. Daher " "gibt :c:func:`Py_BuildValue` ``NULL`` zurück, löst jedoch keine Ausnahme " "aus. Wenn noch keine Ausnahme ausgelöst wurde, wird :exc:`SystemError` " "gesetzt." #: ../../c-api/arg.rst:743 msgid "``S`` (object) [PyObject \\*]" msgstr "``S`` (Objekt) [PyObject \\*]" #: ../../c-api/arg.rst:744 msgid "Same as ``O``." msgstr "Genau wie unter ``O``." #: ../../c-api/arg.rst:746 msgid "``N`` (object) [PyObject \\*]" msgstr "``N`` (Objekt) [PyObject \\*]" #: ../../c-api/arg.rst:747 msgid "" "Same as ``O``, except it doesn't create a new :term:`strong reference`. " "Useful when the object is created by a call to an object constructor in the " "argument list." msgstr "" "Entspricht „ ``O`` “, mit dem Unterschied, dass keine neue :term:`strong " "reference` erstellt wird. Dies ist nützlich, wenn das Objekt durch den " "Aufruf eines Objektkonstruktors in der Argumentliste erstellt wird." #: ../../c-api/arg.rst:751 msgid "``O&`` (object) [*converter*, *anything*]" msgstr "``O&`` (Objekt) [*Konverter*, *beliebiges*]" #: ../../c-api/arg.rst:752 msgid "" "Convert *anything* to a Python object through a *converter* function. The " "function is called with *anything* (which should be compatible " "with :c:expr:`void*`) as its argument and should return a \"new\" Python " "object, or ``NULL`` if an error occurred." msgstr "" "Konvertiert *beliebige Werte* mithilfe einer *Konverter*-Funktion in ein " "Python-Objekt. Die Funktion wird mit *beliebigen Werten* (die " "mit :c:expr:`void*` kompatibel sein sollten) als Argument aufgerufen und " "sollte ein „neues“ Python-Objekt zurückgeben oder bei Auftreten eines " "Fehlers ``NULL`` zurückgeben." #: ../../c-api/arg.rst:757 msgid "``(items)`` (:class:`tuple`) [*matching-items*]" msgstr "``(items)`` (:class:`tuple`) [*passende Artikel*]" #: ../../c-api/arg.rst:758 msgid "" "Convert a sequence of C values to a Python tuple with the same number of " "items." msgstr "" "Wandelt eine Folge von C-Werten in ein Python-Tupel mit derselben Anzahl von " "Elementen um." #: ../../c-api/arg.rst:760 msgid "``[items]`` (:class:`list`) [*matching-items*]" msgstr "``[items]`` (:class:`list`) [*passende Artikel*]" #: ../../c-api/arg.rst:761 msgid "" "Convert a sequence of C values to a Python list with the same number of " "items." msgstr "" "Wandle eine Folge von C-Werten in eine Python-Liste mit derselben Anzahl von " "Elementen um." #: ../../c-api/arg.rst:763 msgid "``{items}`` (:class:`dict`) [*matching-items*]" msgstr "``{items}`` (:class:`dict`) [*passende Artikel*]" #: ../../c-api/arg.rst:764 msgid "" "Convert a sequence of C values to a Python dictionary. Each pair of " "consecutive C values adds one item to the dictionary, serving as key and " "value, respectively." msgstr "" "Wandle eine Folge von C-Werten in ein Python-Wörterbuch um. Jedes Paar " "aufeinanderfolgender C-Werte fügt dem Wörterbuch einen Eintrag hinzu, wobei " "der C-Wert jeweils als Schlüssel und der andere C-Wert als Wert dient." #: ../../c-api/arg.rst:768 msgid "" "If there is an error in the format string, the :exc:`SystemError` exception " "is set and ``NULL`` returned." msgstr "" "Wenn die Formatzeichenfolge einen Fehler enthält, wird die Ausnahme " "„ :exc:`SystemError` “ ausgelöst und „ ``NULL`` “ zurückgegeben." #: ../../c-api/arg.rst:773 msgid "" "Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list " "rather than a variable number of arguments." msgstr "" "Entspricht der Funktion „ :c:func:`Py_BuildValue` “, mit dem Unterschied, " "dass hier anstelle einer variablen Anzahl von Argumenten ein „va_list“ " "übergeben wird."