From b3becd20a0b80a823a7f64f73cd0d0036f3ad372 Mon Sep 17 00:00:00 2001 From: JystBreisgau Date: Sun, 16 Aug 2026 17:25:24 +0200 Subject: [PATCH 1/8] Translation into German started /reference/import.po --- reference/import.po | 1453 +++++++++++++++++++++++++++++++++---------- 1 file changed, 1110 insertions(+), 343 deletions(-) diff --git a/reference/import.po b/reference/import.po index d58aec65..a56a958c 100644 --- a/reference/import.po +++ b/reference/import.po @@ -21,61 +21,103 @@ msgstr "" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" + msgid "The import system" -msgstr "" +msgstr "Das Importsystem" msgid "" -"Python code in one :term:`module` gains access to the code in another module " -"by the process of :term:`importing` it. The :keyword:`import` statement is " -"the most common way of invoking the import machinery, but it is not the only " -"way. Functions such as :func:`importlib.import_module` and built-in :func:" -"`__import__` can also be used to invoke the import machinery." +"Python code in one :term:`module` gains access to the code in another module" +" by the process of :term:`importing` it. The :keyword:`import` statement is" +" the most common way of invoking the import machinery, but it is not the " +"only way. Functions such as :func:`importlib.import_module` and built-in " +":func:`__import__` can also be used to invoke the import machinery." msgstr "" +"Python-Code in einem :term:`Modul` erhält Zugriff auf den Code in einem " +"anderen Modul, indem er diesen :term:`importiert`. Die Anweisung " +":keyword:`import` ist die gängigste Methode, um den Importvorgang " +"auszulösen, aber es ist nicht die einzige Möglichkeit. Auch Funktionen wie `" +" :func:`importlib.import_module` und die integrierte Funktion " +":func:`__import__` können verwendet werden, um den Importvorgang " +"auszulösen." msgid "" -"The :keyword:`import` statement combines two operations; it searches for the " -"named module, then it binds the results of that search to a name in the " +"The :keyword:`import` statement combines two operations; it searches for the" +" named module, then it binds the results of that search to a name in the " "local scope. The search operation of the :keyword:`!import` statement is " "defined as a call to the :func:`__import__` function, with the appropriate " "arguments. The return value of :func:`__import__` is used to perform the " -"name binding operation of the :keyword:`!import` statement. See the :" -"keyword:`!import` statement for the exact details of that name binding " +"name binding operation of the :keyword:`!import` statement. See the " +":keyword:`!import` statement for the exact details of that name binding " "operation." msgstr "" +"Die Anweisung :keyword:`import` kombiniert zwei Operationen: Sie sucht " +"nach dem genannten Modul und bindet anschließend die Ergebnisse dieser Suche" +" an einen Namen im lokalen Geltungsbereich. Die Suchoperation der Anweisung " +"„ :keyword:`!import` ist als Aufruf der Funktion :func:`__import__` " +"mit den entsprechenden Argumenten definiert. Der Rückgabewert von " +":func:`__import__` wird verwendet, um die Namensbindung der Anweisung " +":keyword:`!import` durchzuführen. Genaue Einzelheiten zu dieser " +"Namensbindung finden Sie in der Anweisung :keyword:`!import` ." msgid "" "A direct call to :func:`__import__` performs only the module search and, if " -"found, the module creation operation. While certain side-effects may occur, " -"such as the importing of parent packages, and the updating of various caches " -"(including :data:`sys.modules`), only the :keyword:`import` statement " -"performs a name binding operation." +"found, the module creation operation. While certain side-effects may occur," +" such as the importing of parent packages, and the updating of various " +"caches (including :data:`sys.modules`), only the :keyword:`import` statement" +" performs a name binding operation." msgstr "" +"Ein direkter Aufruf von :func:`__import__` führt lediglich die " +"Modulsuche durch und, falls das Modul gefunden wird, die Modulerstellung. " +"Zwar können dabei gewisse Nebeneffekte auftreten, wie beispielsweise das " +"Importieren übergeordneter Pakete und die Aktualisierung verschiedener " +"Caches (einschließlich :data:`sys.modules`), doch nur die Anweisung " +":keyword:`import` führt eine Namensbindung durch." msgid "" -"When an :keyword:`import` statement is executed, the standard builtin :func:" -"`__import__` function is called. Other mechanisms for invoking the import " -"system (such as :func:`importlib.import_module`) may choose to bypass :func:" -"`__import__` and use their own solutions to implement import semantics." +"When an :keyword:`import` statement is executed, the standard builtin " +":func:`__import__` function is called. Other mechanisms for invoking the " +"import system (such as :func:`importlib.import_module`) may choose to bypass" +" :func:`__import__` and use their own solutions to implement import " +"semantics." msgstr "" +"Bei der Ausführung einer Anweisung vom Typ :keyword:`import` wird die " +"standardmäßige integrierte Funktion :func:`__import__` aufgerufen. " +"Andere Mechanismen zum Aufruf des Importsystems (wie beispielsweise " +":func:`importlib.import_module` ) können :func:`__import__` umgehen und" +" stattdessen eigene Lösungen zur Implementierung der Import-Semantik " +"verwenden." msgid "" "When a module is first imported, Python searches for the module and if " "found, it creates a module object [#fnmo]_, initializing it. If the named " "module cannot be found, a :exc:`ModuleNotFoundError` is raised. Python " -"implements various strategies to search for the named module when the import " -"machinery is invoked. These strategies can be modified and extended by " +"implements various strategies to search for the named module when the import" +" machinery is invoked. These strategies can be modified and extended by " "using various hooks described in the sections below." msgstr "" +"Wenn ein Modul zum ersten Mal importiert wird, sucht Python nach dem Modul " +"und erstellt, falls es gefunden wird, ein Modulobjekt [#fnmo]_ und " +"initialisiert es. Kann das genannte Modul nicht gefunden werden, wird eine " +"Ausnahme vom Typ :exc:`ModuleNotFoundError` ausgelöst. Python setzt " +"verschiedene Strategien ein, um nach dem genannten Modul zu suchen, wenn der" +" Importmechanismus aufgerufen wird. Diese Strategien können mithilfe " +"verschiedener Hooks, die in den folgenden Abschnitten beschrieben werden, " +"angepasst und erweitert werden." msgid "" -"The import system has been updated to fully implement the second phase of :" -"pep:`302`. There is no longer any implicit import machinery - the full " +"The import system has been updated to fully implement the second phase of " +":pep:`302`. There is no longer any implicit import machinery - the full " "import system is exposed through :data:`sys.meta_path`. In addition, native " "namespace package support has been implemented (see :pep:`420`)." msgstr "" +"Das Import-System wurde aktualisiert, um die zweite Phase von :pep:`302` " +"vollständig umzusetzen. Es gibt keine implizite Import-Mechanik mehr – das " +"gesamte Import-System wird über :data:`sys.meta_path` bereitgestellt. " +"Darüber hinaus wurde die native Unterstützung für Namespace-Pakete " +"implementiert (siehe :pep:`420`)." msgid ":mod:`importlib`" -msgstr "" +msgstr ":mod:`importlib`" msgid "" "The :mod:`importlib` module provides a rich API for interacting with the " @@ -84,26 +126,45 @@ msgid "" "import machinery. Refer to the :mod:`importlib` library documentation for " "additional detail." msgstr "" +"Das Modul :mod:`importlib` bietet eine umfangreiche API für die " +"Interaktion mit dem Import-System. So stellt beispielsweise " +":func:`importlib.import_module` eine empfohlene, einfachere API zum " +"Aufrufen der Import-Funktionen dar als die integrierte Funktion " +":func:`__import__` “. Weitere Informationen finden Sie in der Dokumentation " +"zur Bibliothek :mod:`importlib` ." msgid "Packages" -msgstr "" +msgstr "Pakete" msgid "" -"Python has only one type of module object, and all modules are of this type, " -"regardless of whether the module is implemented in Python, C, or something " -"else. To help organize modules and provide a naming hierarchy, Python has a " -"concept of :term:`packages `." +"Python has only one type of module object, and all modules are of this type," +" regardless of whether the module is implemented in Python, C, or something " +"else. To help organize modules and provide a naming hierarchy, Python has a" +" concept of :term:`packages `." msgstr "" +"Python kennt nur einen Typ von Modulobjekt, und alle Module gehören zu " +"diesem Typ, unabhängig davon, ob das Modul in Python, C oder einer anderen " +"Sprache implementiert ist. Um die Organisation von Modulen zu erleichtern " +"und eine Namenshierarchie bereitzustellen, gibt es in Python das Konzept der" +" :term:`Pakete `." msgid "" -"You can think of packages as the directories on a file system and modules as " -"files within directories, but don't take this analogy too literally since " +"You can think of packages as the directories on a file system and modules as" +" files within directories, but don't take this analogy too literally since " "packages and modules need not originate from the file system. For the " "purposes of this documentation, we'll use this convenient analogy of " -"directories and files. Like file system directories, packages are organized " -"hierarchically, and packages may themselves contain subpackages, as well as " -"regular modules." +"directories and files. Like file system directories, packages are organized" +" hierarchically, and packages may themselves contain subpackages, as well as" +" regular modules." msgstr "" +"Man kann sich Pakete wie Verzeichnisse in einem Dateisystem und Module wie " +"Dateien innerhalb dieser Verzeichnisse vorstellen, sollte diese Analogie " +"jedoch nicht allzu wörtlich nehmen, da Pakete und Module nicht unbedingt aus" +" dem Dateisystem stammen müssen. Für die Zwecke dieser Dokumentation werden" +" wir diese praktische Analogie von Verzeichnissen und Dateien verwenden. " +"Wie Verzeichnisse im Dateisystem sind Pakete hierarchisch organisiert, und " +"Pakete können ihrerseits sowohl Unterpakete als auch reguläre Module " +"enthalten." msgid "" "It's important to keep in mind that all packages are modules, but not all " @@ -111,6 +172,10 @@ msgid "" "of module. Specifically, any module that contains a ``__path__`` attribute " "is considered a package." msgstr "" +"Man sollte unbedingt beachten, dass alle Pakete Module sind, aber nicht alle" +" Module Pakete sind. Oder anders ausgedrückt: Pakete sind lediglich eine " +"besondere Art von Modulen. Genauer gesagt gilt jedes Modul, das ein Attribut" +" ``__path__`` enthält, als Paket." msgid "" "All modules have a name. Subpackage names are separated from their parent " @@ -119,26 +184,44 @@ msgid "" "subpackage called :mod:`email.mime` and a module within that subpackage " "called :mod:`email.mime.text`." msgstr "" +"Alle Module haben einen Namen. Die Namen von Unterpaketen werden durch einen" +" Punkt vom Namen ihres übergeordneten Pakets getrennt, ähnlich wie bei der " +"Standard-Syntax für den Zugriff auf Attribute in Python. So könnte es " +"beispielsweise ein Paket namens :mod:`email` geben, das wiederum ein " +"Unterpaket namens :mod:`email.mime` enthält, in dem sich ein Modul " +"namens :mod:`email.mime.text` befindet." msgid "Regular packages" -msgstr "" +msgstr "Reguläre Pakete" msgid "" "Python defines two types of packages, :term:`regular packages ` and :term:`namespace packages `. Regular " -"packages are traditional packages as they existed in Python 3.2 and earlier. " -"A regular package is typically implemented as a directory containing an " -"``__init__.py`` file. When a regular package is imported, this ``__init__." -"py`` file is implicitly executed, and the objects it defines are bound to " -"names in the package's namespace. The ``__init__.py`` file can contain the " -"same Python code that any other module can contain, and Python will add some " -"additional attributes to the module when it is imported." +"packages are traditional packages as they existed in Python 3.2 and earlier." +" A regular package is typically implemented as a directory containing an " +"``__init__.py`` file. When a regular package is imported, this " +"``__init__.py`` file is implicitly executed, and the objects it defines are " +"bound to names in the package's namespace. The ``__init__.py`` file can " +"contain the same Python code that any other module can contain, and Python " +"will add some additional attributes to the module when it is imported." msgstr "" +"Python definiert zwei Arten von Paketen: :term:`reguläre Pakete ` und :term:`Namespace-Pakete `. Reguläre Pakete " +"sind herkömmliche Pakete, wie sie bereits in Python 3.2 und früheren " +"Versionen existierten. Ein reguläres Paket wird in der Regel als Verzeichnis" +" implementiert, das eine Datei ``__init__.py`` enthält. Wenn ein " +"reguläres Paket importiert wird, wird diese Datei ``__init__.py`` " +"implizit ausgeführt, und die darin definierten Objekte werden an Namen im " +"Namensraum des Pakets gebunden. Die Datei ``__init__.py`` kann denselben" +" Python-Code enthalten wie jedes andere Modul auch, und Python fügt dem " +"Modul beim Importieren einige zusätzliche Attribute hinzu." msgid "" -"For example, the following file system layout defines a top level ``parent`` " -"package with three subpackages::" +"For example, the following file system layout defines a top level ``parent``" +" package with three subpackages::" msgstr "" +"Beispielsweise definiert die folgende Dateisystemstruktur ein Paket der " +"obersten Ebene ``parent`` mit drei Unterpaketen::" msgid "" "parent/\n" @@ -150,26 +233,58 @@ msgid "" " three/\n" " __init__.py" msgstr "" +"parent/\n" +" __init__.py\n" +" one/\n" +" __init__.py\n" +" two/\n" +" __init__.py\n" +" three/\n" +" __init__.py" msgid "" "Importing ``parent.one`` will implicitly execute ``parent/__init__.py`` and " "``parent/one/__init__.py``. Subsequent imports of ``parent.two`` or " -"``parent.three`` will execute ``parent/two/__init__.py`` and ``parent/three/" -"__init__.py`` respectively." +"``parent.three`` will execute ``parent/two/__init__.py`` and " +"``parent/three/__init__.py`` respectively." msgstr "" +"Durch das Importieren von ``parent.one`` werden implizit die Dateien " +"``parent/__init__.py`` und ``parent/one/__init__.py`` ausgeführt. Bei " +"nachfolgenden Importen von ``parent.two`` oder ``parent.three`` " +"werden jeweils die Dateien ``parent/two/__init__.py`` und " +"``parent/three/__init__.py`` ausgeführt." -msgid "Namespace packages" +msgid "" +"A subdirectory inside a regular package that does not contain an " +"``__init__.py`` file is treated as an implicit :ref:`namespace package " +"` (a \"namespace subpackage\") rooted in that " +"parent. See :pep:`420` for the underlying specification." msgstr "" +"Ein Unterverzeichnis innerhalb eines regulären Pakets, das keine Datei " +"``__init__.py`` enthält, wird als implizites :ref:`namespace-Paket " +"` (ein \"Namespace-Unterpaket\“) behandelt, " +"dessen Stammverzeichnis das übergeordnete Paket ist. Die zugrunde liegende " +"Spezifikation finden Sie unter :pep:`420`." + +msgid "Namespace packages" +msgstr "Namespace-Pakete" msgid "" "A namespace package is a composite of various :term:`portions `, " -"where each portion contributes a subpackage to the parent package. Portions " -"may reside in different locations on the file system. Portions may also be " -"found in zip files, on the network, or anywhere else that Python searches " +"where each portion contributes a subpackage to the parent package. Portions" +" may reside in different locations on the file system. Portions may also be" +" found in zip files, on the network, or anywhere else that Python searches " "during import. Namespace packages may or may not correspond directly to " "objects on the file system; they may be virtual modules that have no " "concrete representation." msgstr "" +"Ein Namespace-Paket ist eine Zusammensetzung aus verschiedenen :term:`Teilen" +" `, wobei jeder Teil ein Unterpaket zum übergeordneten Paket " +"beiträgt. Teile können sich an verschiedenen Orten im Dateisystem befinden. " +"Teile können sich auch in ZIP-Dateien, im Netzwerk oder an jedem anderen Ort" +" befinden, den Python beim Import durchsucht. Namespace-Pakete müssen nicht" +" unbedingt direkt mit Objekten im Dateisystem korrespondieren; es kann sich " +"um virtuelle Module handeln, die keine konkrete Darstellung haben." msgid "" "Namespace packages do not use an ordinary list for their ``__path__`` " @@ -178,21 +293,48 @@ msgid "" "that package if the path of their parent package (or :data:`sys.path` for a " "top level package) changes." msgstr "" +"Namespace-Pakete verwenden für ihr Attribut ``__path__`` keine " +"gewöhnliche Liste. Stattdessen nutzen sie einen benutzerdefinierten " +"iterierbaren Typ, der beim nächsten Importversuch innerhalb dieses Pakets " +"automatisch eine neue Suche nach Paketteilen durchführt, falls sich der Pfad" +" ihres übergeordneten Pakets (oder :data:`sys.path` bei einem Paket der " +"obersten Ebene) ändert." msgid "" "With namespace packages, there is no ``parent/__init__.py`` file. In fact, " "there may be multiple ``parent`` directories found during import search, " "where each one is provided by a different portion. Thus ``parent/one`` may " -"not be physically located next to ``parent/two``. In this case, Python will " -"create a namespace package for the top-level ``parent`` package whenever it " -"or one of its subpackages is imported." -msgstr "" +"not be physically located next to ``parent/two``. In this case, Python will" +" create a namespace package for the top-level ``parent`` package whenever it" +" or one of its subpackages is imported." +msgstr "" +"Bei Namespace-Paketen gibt es keine Datei ``parent/__init__.py`` . " +"Tatsächlich können bei der Importsuche mehrere Verzeichnisse ``parent`` " +"gefunden werden, wobei jedes von einem anderen Teil bereitgestellt wird. " +"Daher befindet sich ``parent/one`` möglicherweise nicht physisch neben „" +" ``parent/two`` . In diesem Fall erstellt Python ein Namespace-Paket für " +"das Paket ``parent`` auf oberster Ebene, sobald dieses oder eines seiner" +" Unterpakete importiert wird." + +msgid "" +"Namespace packages may also be nested inside a regular package. When the " +"import system searches a regular package's ``__path__`` and encounters a " +"subdirectory that does not contain an ``__init__.py`` file, that " +"subdirectory becomes a :term:`portion` contributing to a namespace " +"subpackage of the enclosing regular package." +msgstr "" +"Namespace-Pakete können auch innerhalb eines regulären Pakets verschachtelt " +"sein. Wenn das Import-System die Datei ``__path__`` eines regulären " +"Pakets durchsucht und auf ein Unterverzeichnis stößt, das keine " +"``__init__.py`` -Datei enthält, wird dieses Unterverzeichnis zu einem " +":term:`Teil`, der zu einem Namespace-Unterpaket des umgebenden regulären " +"Pakets beiträgt." msgid "See also :pep:`420` for the namespace package specification." -msgstr "" +msgstr "Siehe auch :pep:`420` für die Spezifikation des Namespace-Pakets." msgid "Searching" -msgstr "" +msgstr "Suchen" msgid "" "To begin the search, Python needs the :term:`fully qualified ` Namen des Moduls (oder Pakets; für die " +"Zwecke dieser Erörterung ist der Unterschied jedoch unerheblich), das " +"importiert werden soll. Dieser Name kann aus verschiedenen Argumenten der " +"Anweisung :keyword:`import` oder aus den Parametern der Funktionen " +":func:`importlib.import_module` oder :func:`__import__` stammen." msgid "" -"This name will be used in various phases of the import search, and it may be " -"the dotted path to a submodule, e.g. ``foo.bar.baz``. In this case, Python " -"first tries to import ``foo``, then ``foo.bar``, and finally ``foo.bar." -"baz``. If any of the intermediate imports fail, a :exc:`ModuleNotFoundError` " -"is raised." +"This name will be used in various phases of the import search, and it may be" +" the dotted path to a submodule, e.g. ``foo.bar.baz``. In this case, Python" +" first tries to import ``foo``, then ``foo.bar``, and finally " +"``foo.bar.baz``. If any of the intermediate imports fail, a " +":exc:`ModuleNotFoundError` is raised." msgstr "" +"Dieser Name wird in verschiedenen Phasen der Import-Suche verwendet und kann" +" den durch Punkte getrennten Pfad zu einem Submodul darstellen, z. B. " +"``foo.bar.baz``. In diesem Fall versucht Python zunächst, ``foo`` zu " +"importieren, dann ``foo.bar`` und schließlich ``foo.bar.baz``. Wenn einer " +"der Zwischenimporte fehlschlägt, wird ein :exc:`ModuleNotFoundError` " +"ausgelöst." msgid "The module cache" -msgstr "" +msgstr "Der Modul-Cache" msgid "" "The first place checked during import search is :data:`sys.modules`. This " -"mapping serves as a cache of all modules that have been previously imported, " -"including the intermediate paths. So if ``foo.bar.baz`` was previously " -"imported, :data:`sys.modules` will contain entries for ``foo``, ``foo.bar``, " -"and ``foo.bar.baz``. Each key will have as its value the corresponding " +"mapping serves as a cache of all modules that have been previously imported," +" including the intermediate paths. So if ``foo.bar.baz`` was previously " +"imported, :data:`sys.modules` will contain entries for ``foo``, ``foo.bar``," +" and ``foo.bar.baz``. Each key will have as its value the corresponding " "module object." msgstr "" +"Bei der Suche nach importierten Modulen wird zunächst unter " +":data:`sys.modules` nachgeschaut. Diese Zuordnung dient als Cache für alle " +"Module, die zuvor importiert wurden, einschließlich der Zwischenpfade. Wenn " +"also ``foo.bar.baz`` zuvor importiert wurde, enthält :data:`sys.modules` " +"Einträge für ``foo``, ``foo.bar`` und ``foo.bar.baz``. Jeder Schlüssel hat " +"als Wert das entsprechende Modulobjekt." msgid "" "During import, the module name is looked up in :data:`sys.modules` and if " "present, the associated value is the module satisfying the import, and the " -"process completes. However, if the value is ``None``, then a :exc:" -"`ModuleNotFoundError` is raised. If the module name is missing, Python will " -"continue searching for the module." +"process completes. However, if the value is ``None``, then a " +":exc:`ModuleNotFoundError` is raised. If the module name is missing, Python" +" will continue searching for the module." msgstr "" +"Beim Import wird der Modulname unter :data:`sys.modules` nachgeschlagen. Ist" +" dort ein Eintrag vorhanden, entspricht der zugehörige Wert dem Modul, das " +"den Import erfüllt, und der Vorgang wird abgeschlossen. Ist der Wert jedoch " +"``None``, wird eine Ausnahme vom Typ :exc:`ModuleNotFoundError` " +"ausgelöst. Fehlt der Modulname, setzt Python die Suche nach dem Modul fort." msgid "" ":data:`sys.modules` is writable. Deleting a key may not destroy the " "associated module (as other modules may hold references to it), but it will " "invalidate the cache entry for the named module, causing Python to search " -"anew for the named module upon its next import. The key can also be assigned " -"to ``None``, forcing the next import of the module to result in a :exc:" -"`ModuleNotFoundError`." +"anew for the named module upon its next import. The key can also be assigned" +" to ``None``, forcing the next import of the module to result in a " +":exc:`ModuleNotFoundError`." msgstr "" +":data:`sys.modules` ist beschreibbar. Das Löschen eines Schlüssels führt " +"möglicherweise nicht zur Löschung des zugehörigen Moduls (da andere Module " +"möglicherweise Verweise darauf enthalten), macht jedoch den Cache-Eintrag " +"für das genannte Modul ungültig, sodass Python bei dessen nächstem Import " +"erneut nach dem genannten Modul sucht. Dem Schlüssel kann auch der Wert " +"``None`` zugewiesen werden, wodurch der nächste Import des Moduls " +"zwangsläufig zu einem :exc:`ModuleNotFoundError` führt." msgid "" "Beware though, as if you keep a reference to the module object, invalidate " -"its cache entry in :data:`sys.modules`, and then re-import the named module, " -"the two module objects will *not* be the same. By contrast, :func:`importlib." -"reload` will reuse the *same* module object, and simply reinitialise the " -"module contents by rerunning the module's code." -msgstr "" +"its cache entry in :data:`sys.modules`, and then re-import the named module," +" the two module objects will *not* be the same. By contrast, " +":func:`importlib.reload` will reuse the *same* module object, and simply " +"reinitialise the module contents by rerunning the module's code." +msgstr "" +"Beachten Sie jedoch: Wenn Sie einen Verweis auf das Modulobjekt beibehalten," +" dessen Cache-Eintrag unter :data:`sys.modules` ungültig machen und " +"anschließend das genannte Modul erneut importieren, sind die beiden " +"Modulobjekte *nicht* identisch. Im Gegensatz dazu wird bei " +":func:`importlib.reload` das *gleiche* Modulobjekt wiederverwendet und der " +"Inhalt des Moduls durch erneutes Ausführen des Modulcodes einfach neu " +"initialisiert." msgid "Finders and loaders" -msgstr "" +msgstr "Finders und Loader" msgid "" "If the named module is not found in :data:`sys.modules`, then Python's " "import protocol is invoked to find and load the module. This protocol " -"consists of two conceptual objects, :term:`finders ` and :term:" -"`loaders `. A finder's job is to determine whether it can find the " -"named module using whatever strategy it knows about. Objects that implement " -"both of these interfaces are referred to as :term:`importers ` - " -"they return themselves when they find that they can load the requested " -"module." -msgstr "" +"consists of two conceptual objects, :term:`finders ` and " +":term:`loaders `. A finder's job is to determine whether it can find" +" the named module using whatever strategy it knows about. Objects that " +"implement both of these interfaces are referred to as :term:`importers " +"` - they return themselves when they find that they can load the " +"requested module." +msgstr "" +"Wird das angegebene Modul nicht unter :data:`sys.modules` gefunden, wird das" +" Importprotokoll von Python aufgerufen, um das Modul zu suchen und zu laden." +" Dieses Protokoll besteht aus zwei konzeptionellen Objekten: :term:`finders " +"` und :term:`loaders `. Die Aufgabe eines Finders besteht " +"darin, mithilfe aller ihm bekannten Strategien festzustellen, ob er das " +"angegebene Modul finden kann. Objekte, die beide dieser Schnittstellen " +"implementieren, werden als :term:`Importer ` bezeichnet – sie " +"geben sich selbst zurück, wenn sie feststellen, dass sie das angeforderte " +"Modul laden können." msgid "" "Python includes a number of default finders and importers. The first one " @@ -270,11 +458,21 @@ msgid "" "system paths or zip files. It can also be extended to search for any " "locatable resource, such as those identified by URLs." msgstr "" +"Python enthält eine Reihe von Standard-Findern und -Importern. Der erste " +"findet eingebaute Module, der zweite findet „frozen“ Module. Ein dritter " +"Standard-Finder durchsucht einen :term:`Importpfad` nach Modulen. Der " +":term:`Importpfad` ist eine Liste von Speicherorten, die Dateisystempfade " +"oder ZIP-Dateien bezeichnen können. Er lässt sich auch erweitern, um nach " +"beliebigen auffindbaren Ressourcen zu suchen, beispielsweise solchen, die " +"durch URLs identifiziert werden." msgid "" "The import machinery is extensible, so new finders can be added to extend " "the range and scope of module searching." msgstr "" +"Die Importmechanismen sind erweiterbar, sodass neue Suchfunktionen " +"hinzugefügt werden können, um den Umfang und die Reichweite der Modulsuche " +"zu erweitern." msgid "" "Finders do not actually load modules. If they can find the named module, " @@ -282,27 +480,42 @@ msgid "" "related information, which the import machinery then uses when loading the " "module." msgstr "" +"Finder laden Module nicht tatsächlich. Wenn sie das angegebene Modul finden " +"können, geben sie eine :dfn:`Modulspezifikation` zurück, eine Kapselung der " +"importbezogenen Informationen des Moduls, die der Importmechanismus dann " +"beim Laden des Moduls verwendet." msgid "" -"The following sections describe the protocol for finders and loaders in more " -"detail, including how you can create and register new ones to extend the " +"The following sections describe the protocol for finders and loaders in more" +" detail, including how you can create and register new ones to extend the " "import machinery." msgstr "" +"In den folgenden Abschnitten wird das Protokoll für Finder und Loader näher " +"beschrieben, einschließlich der Vorgehensweise, wie Sie neue Finder und " +"Loader erstellen und registrieren können, um die Importmechanismen zu " +"erweitern." msgid "" "In previous versions of Python, finders returned :term:`loaders ` " "directly, whereas now they return module specs which *contain* loaders. " "Loaders are still used during import but have fewer responsibilities." msgstr "" +"In früheren Python-Versionen gaben Suchfunktionen direkt :term:`Loader " +"` zurück, während sie nun Modulspezifikationen zurückgeben, die " +"Loader *enthalten*. Loader werden beim Import weiterhin verwendet, haben " +"jedoch weniger Aufgaben." msgid "Import hooks" -msgstr "" +msgstr "Import-Hooks" msgid "" -"The import machinery is designed to be extensible; the primary mechanism for " -"this are the *import hooks*. There are two types of import hooks: *meta " +"The import machinery is designed to be extensible; the primary mechanism for" +" this are the *import hooks*. There are two types of import hooks: *meta " "hooks* and *import path hooks*." msgstr "" +"Die Import-Mechanismen sind so konzipiert, dass sie erweiterbar sind; der " +"wichtigste Mechanismus hierfür sind die *Import-Hooks*. Es gibt zwei Arten " +"von Import-Hooks: *Meta-Hooks* und *Import-Pfad-Hooks*." msgid "" "Meta hooks are called at the start of import processing, before any other " @@ -311,35 +524,62 @@ msgid "" "modules, or even built-in modules. Meta hooks are registered by adding new " "finder objects to :data:`sys.meta_path`, as described below." msgstr "" +"Meta-Hooks werden zu Beginn der Importverarbeitung aufgerufen, noch bevor " +"andere Importvorgänge stattfinden – mit Ausnahme der Cache-Abfrage unter " +":data:`sys.modules` “. Dadurch können Meta-Hooks die Verarbeitung von " +":data:`sys.path`, eingefrorene Module oder sogar integrierte Module " +"überschreiben. Meta-Hooks werden registriert, indem neue Finder-Objekte zu „" +" :data:`sys.meta_path` hinzugefügt werden, wie im Folgenden beschrieben." msgid "" -"Import path hooks are called as part of :data:`sys.path` (or ``package." -"__path__``) processing, at the point where their associated path item is " -"encountered. Import path hooks are registered by adding new callables to :" -"data:`sys.path_hooks` as described below." +"Import path hooks are called as part of :data:`sys.path` (or " +"``package.__path__``) processing, at the point where their associated path " +"item is encountered. Import path hooks are registered by adding new " +"callables to :data:`sys.path_hooks` as described below." msgstr "" +"Import-Pfad-Hooks werden im Rahmen der Verarbeitung von :data:`sys.path` " +" (oder ``package.__path__`` ) an der Stelle aufgerufen, an der das " +"zugehörige Pfadelement gefunden wird. Import-Pfad-Hooks werden registriert, " +"indem neue aufrufbare Funktionen wie unten beschrieben zu " +":data:`sys.path_hooks` hinzugefügt werden." msgid "The meta path" -msgstr "" +msgstr "Der Metapfad" msgid "" "When the named module is not found in :data:`sys.modules`, Python next " "searches :data:`sys.meta_path`, which contains a list of meta path finder " "objects. These finders are queried in order to see if they know how to " -"handle the named module. Meta path finders must implement a method called :" -"meth:`~importlib.abc.MetaPathFinder.find_spec` which takes three arguments: " -"a name, an import path, and (optionally) a target module. The meta path " +"handle the named module. Meta path finders must implement a method called " +":meth:`~importlib.abc.MetaPathFinder.find_spec` which takes three arguments:" +" a name, an import path, and (optionally) a target module. The meta path " "finder can use any strategy it wants to determine whether it can handle the " "named module or not." msgstr "" +"Wenn das genannte Modul unter :data:`sys.modules` nicht gefunden wird, " +"durchsucht Python als Nächstes :data:`sys.meta_path`, das eine Liste von" +" Meta-Path-Finder-Objekten enthält. Diese Finder werden abgefragt, um " +"festzustellen, ob sie wissen, wie das genannte Modul zu behandeln ist. " +"Meta-Pfadfinder müssen eine Methode namens " +":meth:`~importlib.abc.MetaPathFinder.find_spec` implementieren, die drei " +"Argumente entgegennimmt: einen Namen, einen Importpfad und (optional) ein " +"Zielmodul. Der Meta-Pfadfinder kann eine beliebige Strategie anwenden, um " +"festzustellen, ob er das genannte Modul verarbeiten kann oder nicht." msgid "" "If the meta path finder knows how to handle the named module, it returns a " -"spec object. If it cannot handle the named module, it returns ``None``. " -"If :data:`sys.meta_path` processing reaches the end of its list without " +"spec object. If it cannot handle the named module, it returns ``None``. If" +" :data:`sys.meta_path` processing reaches the end of its list without " "returning a spec, then a :exc:`ModuleNotFoundError` is raised. Any other " "exceptions raised are simply propagated up, aborting the import process." msgstr "" +"Wenn der Meta-Path-Finder weiß, wie das benannte Modul zu verarbeiten ist, " +"gibt er ein Spec-Objekt zurück. Kann er das benannte Modul nicht " +"verarbeiten, gibt er ``None`` zurück. Erreicht die Verarbeitung von " +":data:`sys.meta_path` das Ende der Liste, ohne ein Spec zurückzugeben, " +"wird eine :exc:`ModuleNotFoundError` -Ausnahme ausgelöst. Alle anderen " +"ausgelösten Ausnahmen werden einfach nach oben weitergeleitet, wodurch der " +"Importvorgang abgebrochen wird." msgid "" "The :meth:`~importlib.abc.MetaPathFinder.find_spec` method of meta path " @@ -353,6 +593,18 @@ msgid "" "existing module object that will be the target of loading later. The import " "system passes in a target module only during reload." msgstr "" +"Die Methode :meth:`~importlib.abc.MetaPathFinder.find_spec` von Meta-" +"Pfadfindern wird mit zwei oder drei Argumenten aufgerufen. Das erste " +"Argument ist der vollqualifizierte Name des zu importierenden Moduls, zum " +"Beispiel ``foo.bar.baz``. Das zweite Argument enthält die Pfadeinträge, " +"die für die Modulsuche verwendet werden sollen. Bei Modulen der obersten " +"Ebene ist das zweite Argument ``None``, bei Submodulen oder Subpaketen " +"hingegen ist das zweite Argument der Wert des Attributs ``__path__`` des" +" übergeordneten Pakets. Kann nicht auf das entsprechende Attribut " +"``__path__`` zugegriffen werden, wird eine :exc:`ModuleNotFoundError` " +"ausgelöst. Das dritte Argument ist ein vorhandenes Modulobjekt, das später " +"als Ziel für das Laden dient. Das Import-System übergibt ein Zielmodul nur " +"während des Neuladens." msgid "" "The meta path may be traversed multiple times for a single import request. " @@ -360,50 +612,82 @@ msgid "" "importing ``foo.bar.baz`` will first perform a top level import, calling " "``mpf.find_spec(\"foo\", None, None)`` on each meta path finder (``mpf``). " "After ``foo`` has been imported, ``foo.bar`` will be imported by traversing " -"the meta path a second time, calling ``mpf.find_spec(\"foo.bar\", foo." -"__path__, None)``. Once ``foo.bar`` has been imported, the final traversal " -"will call ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, None)``." -msgstr "" +"the meta path a second time, calling ``mpf.find_spec(\"foo.bar\", " +"foo.__path__, None)``. Once ``foo.bar`` has been imported, the final " +"traversal will call ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__, " +"None)``." +msgstr "" +"Der Metapfad kann bei einer einzelnen Importanforderung mehrfach durchlaufen" +" werden. Angenommen, keines der beteiligten Module wurde bereits " +"zwischengespeichert, dann führt der Import von ``foo.bar.baz`` zunächst " +"einen Import auf oberster Ebene durch, wobei bei jedem Metapfad-Finder " +"(``mpf``) die Funktion ``mpf.find_spec(\"foo\", None, None)`` aufgerufen " +"wird. Nachdem ``foo`` importiert wurde, wird ``foo.bar`` durch ein zweites " +"Durchlaufen des Metapfads importiert, wobei ``mpf.find_spec(\"foo.bar\", " +"foo.__path__, None)`` aufgerufen wird. Sobald ``foo.bar`` importiert wurde, " +"ruft der letzte Durchlauf ``mpf.find_spec(\"foo.bar.baz\", foo.bar.__path__," +" None)`` auf." msgid "" "Some meta path finders only support top level imports. These importers will " "always return ``None`` when anything other than ``None`` is passed as the " "second argument." msgstr "" +"Einige Meta-Path-Finder unterstützen nur Importe auf oberster Ebene. Diese " +"Importer geben stets ``None`` zurück, wenn als zweites Argument etwas " +"anderes als ``None`` übergeben wird." msgid "" -"Python's default :data:`sys.meta_path` has three meta path finders, one that " -"knows how to import built-in modules, one that knows how to import frozen " +"Python's default :data:`sys.meta_path` has three meta path finders, one that" +" knows how to import built-in modules, one that knows how to import frozen " "modules, and one that knows how to import modules from an :term:`import " "path` (i.e. the :term:`path based finder`)." msgstr "" +"Pythons Standard- :data:`sys.meta_path` verfügt über drei Meta-Pfadfinder: " +"einen, der weiß, wie man integrierte Module importiert, einen, der weiß, wie" +" man „frozen“ Module importiert, und einen, der weiß, wie man Module aus " +"einem :term:`Importpfad` importiert (d. h. den :term:`pfadbasierten " +"Finder`)." msgid "" "The :meth:`~importlib.abc.MetaPathFinder.find_spec` method of meta path " "finders replaced :meth:`!find_module`, which is now deprecated. While it " "will continue to work without change, the import machinery will try it only " -"if the finder does not implement :meth:`~importlib.abc.MetaPathFinder." -"find_spec`." +"if the finder does not implement " +":meth:`~importlib.abc.MetaPathFinder.find_spec`." msgstr "" +"Die Methode :meth:`~importlib.abc.MetaPathFinder.find_spec` der Meta-" +"Path-Finder hat :meth:`!find_module` ersetzt, die nun veraltet ist. Sie " +"funktioniert zwar weiterhin unverändert, doch der Importmechanismus greift " +"nur dann darauf zurück, wenn der Finder " +":meth:`~importlib.abc.MetaPathFinder.find_spec` nicht implementiert." msgid "" -"Use of :meth:`!find_module` by the import system now raises :exc:" -"`ImportWarning`." +"Use of :meth:`!find_module` by the import system now raises " +":exc:`ImportWarning`." msgstr "" +"Die Verwendung von :meth:`!find_module` durch das Import-System löst nun" +" den Fehler :exc:`ImportWarning` aus." msgid "" -":meth:`!find_module` has been removed. Use :meth:`~importlib.abc." -"MetaPathFinder.find_spec` instead." +":meth:`!find_module` has been removed. Use " +":meth:`~importlib.abc.MetaPathFinder.find_spec` instead." msgstr "" +":meth:`!find_module` wurde entfernt. Verwenden Sie stattdessen " +":meth:`~importlib.abc.MetaPathFinder.find_spec`." msgid "Loading" -msgstr "" +msgstr "Wird geladen" msgid "" "If and when a module spec is found, the import machinery will use it (and " "the loader it contains) when loading the module. Here is an approximation " "of what happens during the loading portion of import::" msgstr "" +"Wird eine Modulspezifikation gefunden, verwendet der Importmechanismus diese" +" (und den darin enthaltenen Loader) beim Laden des Moduls. Hier ist eine " +"grobe Beschreibung dessen, was während des Ladevorgangs von \"import:\“ " +"geschieht:" msgid "" "module = None\n" @@ -435,14 +719,44 @@ msgid "" " raise\n" "return sys.modules[spec.name]" msgstr "" +"module = None\n" +"if spec.loader is not None and hasattr(spec.loader, 'create_module'):\n" +" # It is assumed 'exec_module' will also be defined on the loader.\n" +" module = spec.loader.create_module(spec)\n" +"if module is None:\n" +" module = ModuleType(spec.name)\n" +"# The import-related module attributes get set here:\n" +"_init_module_attrs(spec, module)\n" +"\n" +"if spec.loader is None:\n" +" # unsupported\n" +" raise ImportError\n" +"if spec.origin is None and spec.submodule_search_locations is not None:\n" +" # namespace package\n" +" sys.modules[spec.name] = module\n" +"elif not hasattr(spec.loader, 'exec_module'):\n" +" module = spec.loader.load_module(spec.name)\n" +"else:\n" +" sys.modules[spec.name] = module\n" +" try:\n" +" spec.loader.exec_module(module)\n" +" except BaseException:\n" +" try:\n" +" del sys.modules[spec.name]\n" +" except KeyError:\n" +" pass\n" +" raise\n" +"return sys.modules[spec.name]" msgid "Note the following details:" -msgstr "" +msgstr "Beachten Sie bitte folgende Details:" msgid "" -"If there is an existing module object with the given name in :data:`sys." -"modules`, import will have already returned it." +"If there is an existing module object with the given name in " +":data:`sys.modules`, import will have already returned it." msgstr "" +"Wenn unter :data:`sys.modules` bereits ein Modulobjekt mit dem angegebenen " +"Namen vorhanden ist, hat \"import\“ dieses bereits zurückgegeben." msgid "" "The module will exist in :data:`sys.modules` before the loader executes the " @@ -451,14 +765,26 @@ msgid "" "prevents unbounded recursion in the worst case and multiple loading in the " "best." msgstr "" +"Das Modul wird in :data:`sys.modules` vorhanden sein, bevor der Loader " +"den Modulcode ausführt. Dies ist von entscheidender Bedeutung, da der " +"Modulcode sich möglicherweise (direkt oder indirekt) selbst importiert; " +"durch das vorherige Hinzufügen zu :data:`sys.modules` wird im " +"schlimmsten Fall eine unbegrenzte Rekursion und im besten Fall ein " +"mehrfaches Laden verhindert." msgid "" "If loading fails, the failing module -- and only the failing module -- gets " -"removed from :data:`sys.modules`. Any module already in the :data:`sys." -"modules` cache, and any module that was successfully loaded as a side-" -"effect, must remain in the cache. This contrasts with reloading where even " -"the failing module is left in :data:`sys.modules`." +"removed from :data:`sys.modules`. Any module already in the " +":data:`sys.modules` cache, and any module that was successfully loaded as a " +"side-effect, must remain in the cache. This contrasts with reloading where " +"even the failing module is left in :data:`sys.modules`." msgstr "" +"Wenn das Laden fehlschlägt, wird das fehlerhafte Modul – und nur das " +"fehlerhafte Modul – aus :data:`sys.modules` entfernt. Alle Module, die sich " +"bereits im Cache von :data:`sys.modules` befinden, sowie alle Module, die " +"als Nebeneffekt erfolgreich geladen wurden, müssen im Cache verbleiben. Dies" +" steht im Gegensatz zum Neuladen, bei dem selbst das fehlerhafte Modul in " +":data:`sys.modules` verbleibt." msgid "" "After the module is created but before execution, the import machinery sets " @@ -466,26 +792,39 @@ msgid "" "code example above), as summarized in a :ref:`later section `." msgstr "" +"Nachdem das Modul erstellt wurde, aber noch vor seiner Ausführung, legt der " +"Importmechanismus die importbezogenen Modulattribute fest " +"(„_init_module_attrs“ im obigen Pseudocode-Beispiel), wie in einem " +":ref:`späteren Abschnitt ` zusammengefasst." msgid "" "Module execution is the key moment of loading in which the module's " "namespace gets populated. Execution is entirely delegated to the loader, " "which gets to decide what gets populated and how." msgstr "" +"Die Modulausführung ist der entscheidende Moment beim Laden, in dem der " +"Namensraum des Moduls gefüllt wird. Die Ausführung wird vollständig an den " +"Loader delegiert, der entscheidet, was wie gefüllt wird." msgid "" -"The module created during loading and passed to exec_module() may not be the " -"one returned at the end of import [#fnlo]_." +"The module created during loading and passed to exec_module() may not be the" +" one returned at the end of import [#fnlo]_." msgstr "" +"Das beim Laden erstellte und an `exec_module()` übergebene Modul ist " +"möglicherweise nicht dasselbe, das am Ende des Importvorgangs von " +"[#fnlo]_ zurückgegeben wird." msgid "" "The import system has taken over the boilerplate responsibilities of " -"loaders. These were previously performed by the :meth:`importlib.abc.Loader." -"load_module` method." +"loaders. These were previously performed by the " +":meth:`importlib.abc.Loader.load_module` method." msgstr "" +"Das Import-System hat die Routineaufgaben der Loader übernommen. Diese " +"wurden zuvor von der Methode :meth:`importlib.abc.Loader.load_module` " +"ausgeführt." msgid "Loaders" -msgstr "" +msgstr "Lader" msgid "" "Module loaders provide the critical function of loading: module execution. " @@ -493,27 +832,45 @@ msgid "" "method with a single argument, the module object to execute. Any value " "returned from :meth:`~importlib.abc.Loader.exec_module` is ignored." msgstr "" +"Modullader erfüllen die entscheidende Funktion des Ladens: die Ausführung " +"des Moduls. Der Importmechanismus ruft die Methode " +":meth:`importlib.abc.Loader.exec_module` mit einem einzigen Argument auf, " +"nämlich dem auszuführenden Modulobjekt. Jeder von " +":meth:`~importlib.abc.Loader.exec_module` zurückgegebene Wert wird " +"ignoriert." msgid "Loaders must satisfy the following requirements:" -msgstr "" +msgstr "Lader müssen die folgenden Anforderungen erfüllen:" msgid "" "If the module is a Python module (as opposed to a built-in module or a " "dynamically loaded extension), the loader should execute the module's code " "in the module's global name space (``module.__dict__``)." msgstr "" +"Handelt es sich bei dem Modul um ein Python-Modul (im Gegensatz zu einem " +"integrierten Modul oder einer dynamisch geladenen Erweiterung), sollte der " +"Loader den Code des Moduls im globalen Namensraum des Moduls ausführen " +"(``module.__dict__``)." msgid "" -"If the loader cannot execute the module, it should raise an :exc:" -"`ImportError`, although any other exception raised during :meth:`~importlib." -"abc.Loader.exec_module` will be propagated." +"If the loader cannot execute the module, it should raise an " +":exc:`ImportError`, although any other exception raised during " +":meth:`~importlib.abc.Loader.exec_module` will be propagated." msgstr "" +"Wenn der Loader das Modul nicht ausführen kann, sollte er eine " +":exc:`ImportError` auslösen; alle anderen Ausnahmen, die während " +":meth:`~importlib.abc.Loader.exec_module` ausgelöst werden, werden jedoch " +"weitergegeben." msgid "" "In many cases, the finder and loader can be the same object; in such cases " -"the :meth:`~importlib.abc.MetaPathFinder.find_spec` method would just return " -"a spec with the loader set to ``self``." +"the :meth:`~importlib.abc.MetaPathFinder.find_spec` method would just return" +" a spec with the loader set to ``self``." msgstr "" +"In vielen Fällen können Finder und Loader dasselbe Objekt sein; in solchen " +"Fällen würde die Methode :meth:`~importlib.abc.MetaPathFinder.find_spec` “" +" lediglich eine Spezifikation zurückgeben, bei der der Loader auf ``self``" +" gesetzt ist." msgid "" "Module loaders may opt in to creating the module object during loading by " @@ -523,15 +880,27 @@ msgid "" "the module object. If the method returns ``None``, the import machinery " "will create the new module itself." msgstr "" +"Modullader können sich dafür entscheiden, das Modulobjekt während des Ladens" +" zu erstellen, indem sie eine Methode " +":meth:`~importlib.abc.Loader.create_module` implementieren. Diese Methode " +"nimmt ein Argument entgegen – die Modulspezifikation – und gibt das neue " +"Modulobjekt zurück, das während des Ladens verwendet werden soll. " +"``create_module()`` muss keine Attribute für das Modulobjekt festlegen. " +"Wenn die Methode ``None`` zurückgibt, erstellt der Importmechanismus das" +" neue Modul selbst." msgid "The :meth:`~importlib.abc.Loader.create_module` method of loaders." msgstr "" +"Die :meth:`~importlib.abc.Loader.create_module` “-Methode bei Ladegeräten." msgid "" -"The :meth:`~importlib.abc.Loader.load_module` method was replaced by :meth:" -"`~importlib.abc.Loader.exec_module` and the import machinery assumed all the " -"boilerplate responsibilities of loading." +"The :meth:`~importlib.abc.Loader.load_module` method was replaced by " +":meth:`~importlib.abc.Loader.exec_module` and the import machinery assumed " +"all the boilerplate responsibilities of loading." msgstr "" +"Die Methode :meth:`~importlib.abc.Loader.load_module` wurde durch " +":meth:`~importlib.abc.Loader.exec_module` ersetzt, und die Import-" +"Mechanismen übernahmen alle Routineaufgaben beim Laden." msgid "" "For compatibility with existing loaders, the import machinery will use the " @@ -539,73 +908,113 @@ msgid "" "also implement ``exec_module()``. However, ``load_module()`` has been " "deprecated and loaders should implement ``exec_module()`` instead." msgstr "" +"Um die Kompatibilität mit bestehenden Ladern zu gewährleisten, verwendet die" +" Import-Maschinerie die Methode ``load_module()`` der Lader, sofern " +"diese vorhanden ist und der Lader nicht zusätzlich ``exec_module()`` " +"implementiert. ``load_module()`` ist jedoch veraltet, und Lader sollten " +"stattdessen ``exec_module()`` implementieren." msgid "" "The ``load_module()`` method must implement all the boilerplate loading " "functionality described above in addition to executing the module. All the " "same constraints apply, with some additional clarification:" msgstr "" +"Die Methode ``load_module()`` muss neben der Ausführung des Moduls auch " +"alle oben beschriebenen Standardfunktionen zum Laden des Moduls " +"implementieren. Es gelten dieselben Einschränkungen, wobei einige " +"zusätzliche Erläuterungen zu beachten sind:" msgid "" -"If there is an existing module object with the given name in :data:`sys." -"modules`, the loader must use that existing module. (Otherwise, :func:" -"`importlib.reload` will not work correctly.) If the named module does not " -"exist in :data:`sys.modules`, the loader must create a new module object and " -"add it to :data:`sys.modules`." +"If there is an existing module object with the given name in " +":data:`sys.modules`, the loader must use that existing module. (Otherwise, " +":func:`importlib.reload` will not work correctly.) If the named module does" +" not exist in :data:`sys.modules`, the loader must create a new module " +"object and add it to :data:`sys.modules`." msgstr "" +"Wenn in :data:`sys.modules` bereits ein Modulobjekt mit dem angegebenen " +"Namen vorhanden ist, muss der Loader dieses vorhandene Modul verwenden. " +"(Andernfalls funktioniert :func:`importlib.reload` nicht ordnungsgemäß.)" +" Wenn das genannte Modul in :data:`sys.modules` nicht vorhanden ist, " +"muss der Loader ein neues Modulobjekt erstellen und es zu " +":data:`sys.modules` hinzufügen." msgid "" "The module *must* exist in :data:`sys.modules` before the loader executes " "the module code, to prevent unbounded recursion or multiple loading." msgstr "" +"Das Modul *muss* in :data:`sys.modules` vorhanden sein, bevor der Loader" +" den Modulcode ausführt, um unbegrenzte Rekursion oder mehrfaches Laden zu " +"verhindern." msgid "" -"If loading fails, the loader must remove any modules it has inserted into :" -"data:`sys.modules`, but it must remove **only** the failing module(s), and " +"If loading fails, the loader must remove any modules it has inserted into " +":data:`sys.modules`, but it must remove **only** the failing module(s), and " "only if the loader itself has loaded the module(s) explicitly." msgstr "" +"Sollte das Laden fehlschlagen, muss der Loader alle Module entfernen, die er" +" in :data:`sys.modules` eingefügt hat; dabei darf er jedoch **nur** die " +"fehlerhaften Module entfernen, und zwar nur dann, wenn der Loader diese " +"Module selbst explizit geladen hat." msgid "" "A :exc:`DeprecationWarning` is raised when ``exec_module()`` is defined but " "``create_module()`` is not." msgstr "" +"Eine :exc:`DeprecationWarning` wird ausgelöst, wenn ``exec_module()`` " +"“ definiert ist, ``create_module()`` jedoch nicht." msgid "" "An :exc:`ImportError` is raised when ``exec_module()`` is defined but " "``create_module()`` is not." msgstr "" +"Eine :exc:`ImportError` “-Ausnahme wird ausgelöst, wenn " +"``exec_module()`` definiert ist, ``create_module()`` jedoch nicht." msgid "Use of ``load_module()`` will raise :exc:`ImportWarning`." msgstr "" +"Die Verwendung von ``load_module()`` führt zu :exc:`ImportWarning` ." msgid "Submodules" -msgstr "" +msgstr "Untermodule" msgid "" -"When a submodule is loaded using any mechanism (e.g. ``importlib`` APIs, the " -"``import`` or ``import-from`` statements, or built-in ``__import__()``) a " +"When a submodule is loaded using any mechanism (e.g. ``importlib`` APIs, the" +" ``import`` or ``import-from`` statements, or built-in ``__import__()``) a " "binding is placed in the parent module's namespace to the submodule object. " "For example, if package ``spam`` has a submodule ``foo``, after importing " "``spam.foo``, ``spam`` will have an attribute ``foo`` which is bound to the " "submodule. Let's say you have the following directory structure::" msgstr "" +"Wenn ein Submodul über einen beliebigen Mechanismus geladen wird (z. B. über" +" die ``importlib`` -APIs, die Anweisungen ``import`` oder ``import-" +"from`` oder die integrierte Funktion ``__import__()`` ), wird im " +"Namensraum des übergeordneten Moduls eine Bindung zum Submodul-Objekt " +"hergestellt. Wenn beispielsweise das Paket ``spam`` ein Submodul " +"``foo`` enthält, verfügt ``spam`` nach dem Import von ``spam.foo`` " +" über ein Attribut ``foo``, das an das Submodul gebunden ist. Nehmen " +"wir an, Sie haben die folgende Verzeichnisstruktur::" msgid "" "spam/\n" " __init__.py\n" " foo.py" msgstr "" +"spam/\n" +" __init__.py\n" +" foo.py" msgid "and ``spam/__init__.py`` has the following line in it::" -msgstr "" +msgstr "und die Datei ``spam/__init__.py`` enthält die folgende Zeile::" msgid "from .foo import Foo" -msgstr "" +msgstr "from .foo import Foo" msgid "" "then executing the following puts name bindings for ``foo`` and ``Foo`` in " "the ``spam`` module::" msgstr "" +"Wenn Sie anschließend den folgenden Befehl ausführen, werden im Modul " +"``spam`` Namenszuordnungen für ``foo`` und ``Foo`` festgelegt::" msgid "" ">>> import spam\n" @@ -614,24 +1023,40 @@ msgid "" ">>> spam.Foo\n" "" msgstr "" +">>> import spam\n" +">>> spam.foo\n" +"\n" +">>> spam.Foo\n" +"" msgid "" "Given Python's familiar name binding rules this might seem surprising, but " "it's actually a fundamental feature of the import system. The invariant " -"holding is that if you have ``sys.modules['spam']`` and ``sys.modules['spam." -"foo']`` (as you would after the above import), the latter must appear as the " -"``foo`` attribute of the former." +"holding is that if you have ``sys.modules['spam']`` and " +"``sys.modules['spam.foo']`` (as you would after the above import), the " +"latter must appear as the ``foo`` attribute of the former." msgstr "" +"Angesichts der bekannten Regeln zur Namensbindung in Python mag dies " +"überraschend erscheinen, ist jedoch tatsächlich ein grundlegendes Merkmal " +"des Import-Systems. Die unveränderliche Regel lautet: Wenn Sie " +"``sys.modules['spam']`` und ``sys.modules['spam.foo']`` haben (wie es " +"nach dem obigen Import der Fall wäre), muss Letzteres als Attribut ``foo``" +" von Ersterem erscheinen." msgid "Module specs" -msgstr "" +msgstr "Modulspezifikationen" msgid "" "The import machinery uses a variety of information about each module during " -"import, especially before loading. Most of the information is common to all " -"modules. The purpose of a module's spec is to encapsulate this import-" +"import, especially before loading. Most of the information is common to all" +" modules. The purpose of a module's spec is to encapsulate this import-" "related information on a per-module basis." msgstr "" +"Die Import-Maschinerie nutzt beim Import, insbesondere vor dem Laden, eine " +"Vielzahl von Informationen zu jedem Modul. Die meisten dieser Informationen " +"gelten für alle Module gleichermaßen. Der Zweck der Spezifikation eines " +"Moduls besteht darin, diese importbezogenen Informationen modulweise zu " +"kapseln." msgid "" "Using a spec during import allows state to be transferred between import " @@ -640,180 +1065,303 @@ msgid "" "machinery to perform the boilerplate operations of loading, whereas without " "a module spec the loader had that responsibility." msgstr "" +"Die Verwendung einer Spezifikation beim Import ermöglicht die Übertragung " +"des Zustands zwischen den Komponenten des Importsystems, z. B. zwischen dem " +"Finder, der die Modulspezifikation erstellt, und dem Loader, der sie " +"ausführt. Vor allem ermöglicht sie es dem Importmechanismus, die " +"Routinevorgänge des Ladens durchzuführen, während ohne eine " +"Modulspezifikation diese Aufgabe beim Loader lag." msgid "" -"The module's spec is exposed as :attr:`module.__spec__`. Setting :attr:`!" -"__spec__` appropriately applies equally to :ref:`modules initialized during " -"interpreter startup `. The one exception is ``__main__``, where :" -"attr:`!__spec__` is :ref:`set to None in some cases `." +"The module's spec is exposed as :attr:`module.__spec__`. Setting " +":attr:`!__spec__` appropriately applies equally to :ref:`modules initialized" +" during interpreter startup `. The one exception is ``__main__``, " +"where :attr:`!__spec__` is :ref:`set to None in some cases `." msgstr "" +"Die Spezifikation des Moduls ist unter :attr:`module.__spec__` verfügbar. " +"Die entsprechende Einstellung von :attr:`!__spec__` gilt gleichermaßen für " +":ref:`Module, die beim Start des Interpreters initialisiert werden " +"`. Die einzige Ausnahme bildet ``__main__``, wo :attr:`!__spec__` " +"in einigen Fällen :ref:`auf None gesetzt wird `." msgid "" "See :class:`~importlib.machinery.ModuleSpec` for details on the contents of " "the module spec." msgstr "" +"Weitere Informationen zum Inhalt der Modulspezifikation finden Sie unter " +":class:`~importlib.machinery.ModuleSpec`." msgid "__path__ attributes on modules" -msgstr "" - -msgid "" -"The :attr:`~module.__path__` attribute should be a (possibly empty) :term:" -"`sequence` of strings enumerating the locations where the package's " -"submodules will be found. By definition, if a module has a :attr:`!__path__` " -"attribute, it is a :term:`package`." -msgstr "" - -msgid "" -"A package's :attr:`~module.__path__` attribute is used during imports of its " -"subpackages. Within the import machinery, it functions much the same as :" -"data:`sys.path`, i.e. providing a list of locations to search for modules " -"during import. However, :attr:`!__path__` is typically much more constrained " -"than :data:`!sys.path`." -msgstr "" - -msgid "" -"The same rules used for :data:`sys.path` also apply to a package's :attr:`!" -"__path__`. :data:`sys.path_hooks` (described below) are consulted when " -"traversing a package's :attr:`!__path__`." -msgstr "" - -msgid "" -"A package's ``__init__.py`` file may set or alter the package's :attr:" -"`~module.__path__` attribute, and this was typically the way namespace " -"packages were implemented prior to :pep:`420`. With the adoption of :pep:" -"`420`, namespace packages no longer need to supply ``__init__.py`` files " -"containing only :attr:`!__path__` manipulation code; the import machinery " -"automatically sets :attr:`!__path__` correctly for the namespace package." -msgstr "" +msgstr "__path__-Attribute in Modulen" + +msgid "" +"The :attr:`~module.__path__` attribute should be a (possibly empty) " +":term:`sequence` of strings enumerating the locations where the package's " +"submodules will be found. By definition, if a module has a :attr:`!__path__`" +" attribute, it is a :term:`package`." +msgstr "" +"Das Attribut :attr:`~module.__path__` sollte eine (möglicherweise leere)" +" :term:`Sequenz` von Zeichenketten sein, die die Speicherorte auflistet, an " +"denen die Submodule des Pakets zu finden sind. Per Definition gilt: Wenn ein" +" Modul über ein Attribut :attr:`!__path__` verfügt, handelt es sich um " +"ein :term:`Paket`." + +msgid "" +"A package's :attr:`~module.__path__` attribute is used during imports of its" +" subpackages. Within the import machinery, it functions much the same as " +":data:`sys.path`, i.e. providing a list of locations to search for modules " +"during import. However, :attr:`!__path__` is typically much more constrained" +" than :data:`!sys.path`." +msgstr "" +"Das Attribut :attr:`~module.__path__` eines Pakets wird beim Import " +"seiner Unterpakete verwendet. Innerhalb des Importmechanismus funktioniert " +"es ähnlich wie :data:`sys.path`, d. h., es liefert eine Liste von " +"Speicherorten, an denen beim Import nach Modulen gesucht wird. Allerdings " +"ist :attr:`!__path__` in der Regel wesentlich stärker eingeschränkt als " +" :data:`!sys.path` ." + +msgid "" +"The same rules used for :data:`sys.path` also apply to a package's " +":attr:`!__path__`. :data:`sys.path_hooks` (described below) are consulted " +"when traversing a package's :attr:`!__path__`." +msgstr "" +"Die gleichen Regeln, die für :data:`sys.path` gelten, gelten auch für " +"die :attr:`!__path__` eines Pakets. :data:`sys.path_hooks` (siehe " +"unten) werden beim Durchlaufen der :attr:`!__path__` eines Pakets " +"herangezogen." + +msgid "" +"A package's ``__init__.py`` file may set or alter the package's " +":attr:`~module.__path__` attribute, and this was typically the way namespace" +" packages were implemented prior to :pep:`420`. With the adoption of " +":pep:`420`, namespace packages no longer need to supply ``__init__.py`` " +"files containing only :attr:`!__path__` manipulation code; the import " +"machinery automatically sets :attr:`!__path__` correctly for the namespace " +"package." +msgstr "" +"Die Datei ``__init__.py`` eines Pakets kann das Attribut " +":attr:`~module.__path__` des Pakets festlegen oder ändern; auf diese Weise" +" wurden Namespace-Pakete vor der Einführung von :pep:`420` in der Regel " +"implementiert. Mit der Einführung von :pep:`420` müssen Namespace-Pakete" +" keine ``__init__.py`` “-Dateien mehr bereitstellen, die ausschließlich " +"Code zur Bearbeitung von :attr:`!__path__` enthalten; die Import-" +"Mechanik legt :attr:`!__path__` für das Namespace-Paket automatisch " +"korrekt fest." msgid "Module reprs" -msgstr "" +msgstr "Modul-Repräsentanten" msgid "" "By default, all modules have a usable repr, however depending on the " "attributes set above, and in the module's spec, you can more explicitly " "control the repr of module objects." msgstr "" +"Standardmäßig verfügen alle Module über eine verwendbare \"repr\“-Darstellung." +" Je nach den oben festgelegten Attributen und den Angaben in der Modul-" +"Spezifikation können Sie die \"repr\“-Darstellung von Modulobjekten jedoch " +"expliziter steuern." msgid "" "If the module has a spec (``__spec__``), the import machinery will try to " "generate a repr from it. If that fails or there is no spec, the import " "system will craft a default repr using whatever information is available on " -"the module. It will try to use the ``module.__name__``, ``module." -"__file__``, and ``module.__loader__`` as input into the repr, with defaults " -"for whatever information is missing." -msgstr "" +"the module. It will try to use the ``module.__name__``, " +"``module.__file__``, and ``module.__loader__`` as input into the repr, with " +"defaults for whatever information is missing." +msgstr "" +"Wenn das Modul über eine Spezifikation (``__spec__``) verfügt, versucht der " +"Importmechanismus, daraus eine Repr zu generieren. Sollte dies fehlschlagen " +"oder keine Spezifikation vorhanden sein, erstellt das Importsystem eine " +"Standard-Repr unter Verwendung der für das Modul verfügbaren Informationen. " +"Dabei versucht es, die Dateien ``module.__name__``, " +"``module.__file__`` und ``module.__loader__`` als Eingabe für die Repr" +" zu verwenden, wobei fehlende Informationen durch Standardwerte ersetzt " +"werden." msgid "Here are the exact rules used:" -msgstr "" +msgstr "Hier sind die genauen Regeln, die angewendet wurden:" msgid "" "If the module has a ``__spec__`` attribute, the information in the spec is " "used to generate the repr. The \"name\", \"loader\", \"origin\", and " "\"has_location\" attributes are consulted." msgstr "" +"Verfügt das Modul über ein Attribut ``__spec__``, werden die " +"Informationen in der Spezifikation zur Generierung der Repr verwendet. Dabei" +" werden die Attribute \"name\“, \"loader\“, \"origin\“ und \"has_location\“ " +"herangezogen." msgid "" "If the module has a ``__file__`` attribute, this is used as part of the " "module's repr." msgstr "" +"Wenn das Modul über ein Attribut ``__file__`` verfügt, wird dieses als " +"Teil der \"repr\“-Darstellung des Moduls verwendet." msgid "" -"If the module has no ``__file__`` but does have a ``__loader__`` that is not " -"``None``, then the loader's repr is used as part of the module's repr." +"If the module has no ``__file__`` but does have a ``__loader__`` that is not" +" ``None``, then the loader's repr is used as part of the module's repr." msgstr "" +"Wenn das Modul kein ``__file__`` hat, aber über ein ``__loader__`` " +"verfügt, das nicht ``None`` ist, wird die `repr` des Laders als Teil der " +"`repr` des Moduls verwendet." msgid "Otherwise, just use the module's ``__name__`` in the repr." msgstr "" +"Ansonsten verwende einfach die Methode ``__name__`` des Moduls in der " +" \"repr\“-Anweisung." msgid "" "Use of :meth:`!module_repr`, having been deprecated since Python 3.4, was " "removed in Python 3.12 and is no longer called during the resolution of a " "module's repr." msgstr "" +"Die Verwendung von :meth:`!module_repr``, die bereits seit Python 3.4 als " +"veraltet gilt, wurde in Python 3.12 entfernt und wird bei der Auflösung des " +"`repr`-Objekts eines Moduls nicht mehr aufgerufen." msgid "Cached bytecode invalidation" -msgstr "" +msgstr "Ungültigmachung von zwischengespeichertem Bytecode" msgid "" "Before Python loads cached bytecode from a ``.pyc`` file, it checks whether " "the cache is up-to-date with the source ``.py`` file. By default, Python " "does this by storing the source's last-modified timestamp and size in the " -"cache file when writing it. At runtime, the import system then validates the " -"cache file by checking the stored metadata in the cache file against the " +"cache file when writing it. At runtime, the import system then validates the" +" cache file by checking the stored metadata in the cache file against the " "source's metadata." msgstr "" +"Bevor Python zwischengespeicherten Bytecode aus einer ``.pyc`` “-Datei " +"lädt, prüft es, ob der Cache mit der Quelldatei ``.py`` auf dem neuesten" +" Stand ist. Standardmäßig speichert Python dazu beim Schreiben der Cache-" +"Datei den Zeitstempel der letzten Änderung sowie die Größe der Quelldatei in" +" der Cache-Datei. Zur Laufzeit überprüft das Import-System dann die Cache-" +"Datei, indem es die darin gespeicherten Metadaten mit den Metadaten der " +"Quell vergleicht." msgid "" "Python also supports \"hash-based\" cache files, which store a hash of the " "source file's contents rather than its metadata. There are two variants of " -"hash-based ``.pyc`` files: checked and unchecked. For checked hash-based ``." -"pyc`` files, Python validates the cache file by hashing the source file and " -"comparing the resulting hash with the hash in the cache file. If a checked " -"hash-based cache file is found to be invalid, Python regenerates it and " -"writes a new checked hash-based cache file. For unchecked hash-based ``." -"pyc`` files, Python simply assumes the cache file is valid if it exists. " -"Hash-based ``.pyc`` files validation behavior may be overridden with the :" -"option:`--check-hash-based-pycs` flag." -msgstr "" - -msgid "" -"Added hash-based ``.pyc`` files. Previously, Python only supported timestamp-" -"based invalidation of bytecode caches." -msgstr "" +"hash-based ``.pyc`` files: checked and unchecked. For checked hash-based " +"``.pyc`` files, Python validates the cache file by hashing the source file " +"and comparing the resulting hash with the hash in the cache file. If a " +"checked hash-based cache file is found to be invalid, Python regenerates it " +"and writes a new checked hash-based cache file. For unchecked hash-based " +"``.pyc`` files, Python simply assumes the cache file is valid if it exists. " +"Hash-based ``.pyc`` files validation behavior may be overridden with the " +":option:`--check-hash-based-pycs` flag." +msgstr "" +"Python unterstützt außerdem \"hashbasierte\“ Cache-Dateien, die anstelle der " +"Metadaten einen Hash des Inhalts der Quelldatei speichern. Es gibt zwei " +"Varianten hashbasierter ``.pyc`` -Dateien: geprüfte und ungeprüfte. Bei " +"geprüften hashbasierten ``.pyc`` -Dateien überprüft Python die Cache-Datei, " +"indem es die Quelldatei hasht und den resultierenden Hash mit dem Hash in " +"der Cache-Datei vergleicht. Wird eine geprüfte hash-basierte Cache-Datei als" +" ungültig erkannt, generiert Python sie neu und schreibt eine neue geprüfte " +"hash-basierte Cache-Datei. Bei ungeprüften hash-basierten ``.pyc`` -Dateien " +"geht Python einfach davon aus, dass die Cache-Datei gültig ist, sofern sie " +"vorhanden ist. Das Validierungsverhalten von hash-basierten ``.pyc`` " +"-Dateien kann mit dem Flag :option:`--check-hash-based-pycs` " +"überschrieben werden." + +msgid "" +"Added hash-based ``.pyc`` files. Previously, Python only supported " +"timestamp-based invalidation of bytecode caches." +msgstr "" +"Es wurden Hash-basierte ``.pyc`` “-Dateien hinzugefügt. Bisher " +"unterstützte Python nur die zeitstempelbasierte Ungültigkeitserklärung von " +"Bytecode-Caches." msgid "The Path Based Finder" -msgstr "" +msgstr "Der pfadbasierte Finder" msgid "" "As mentioned previously, Python comes with several default meta path " -"finders. One of these, called the :term:`path based finder` (:class:" -"`~importlib.machinery.PathFinder`), searches an :term:`import path`, which " -"contains a list of :term:`path entries `. Each path entry names " -"a location to search for modules." +"finders. One of these, called the :term:`path based finder` " +"(:class:`~importlib.machinery.PathFinder`), searches an :term:`import path`," +" which contains a list of :term:`path entries `. Each path " +"entry names a location to search for modules." msgstr "" +"Wie bereits erwähnt, verfügt Python über mehrere standardmäßige Metapfad-" +"Suchfunktionen. Eine davon, der sogenannte :term:`pfadbasierte Sucher` " +"(:class:`~importlib.machinery.PathFinder`), durchsucht einen " +":term:`Importpfad`, der eine Liste von :term:`Pfadeinträgen ` " +"enthält. Jeder Pfadeintrag gibt einen Speicherort an, an dem nach Modulen " +"gesucht werden soll." msgid "" "The path based finder itself doesn't know how to import anything. Instead, " "it traverses the individual path entries, associating each of them with a " "path entry finder that knows how to handle that particular kind of path." msgstr "" +"Der pfadbasierte Finder selbst weiß nicht, wie man etwas importiert. " +"Stattdessen durchläuft er die einzelnen Pfadeinträge und ordnet jedem von " +"ihnen einen Pfadeintrags-Finder zu, der weiß, wie man mit dieser bestimmten " +"Art von Pfad umgeht." msgid "" "The default set of path entry finders implement all the semantics for " "finding modules on the file system, handling special file types such as " "Python source code (``.py`` files), Python byte code (``.pyc`` files) and " -"shared libraries (e.g. ``.so`` files). When supported by the :mod:" -"`zipimport` module in the standard library, the default path entry finders " -"also handle loading all of these file types (other than shared libraries) " -"from zipfiles." +"shared libraries (e.g. ``.so`` files). When supported by the " +":mod:`zipimport` module in the standard library, the default path entry " +"finders also handle loading all of these file types (other than shared " +"libraries) from zipfiles." msgstr "" +"Die standardmäßigen Pfadeintrags-Finder implementieren die gesamte Semantik " +"zum Auffinden von Modulen im Dateisystem und unterstützen dabei spezielle " +"Dateitypen wie Python-Quellcode (``.py`` -Dateien), Python-Bytecode " +"(``.pyc`` -Dateien) und gemeinsam genutzte Bibliotheken (z. B. ``.so`` " +"-Dateien). Sofern dies vom Modul :mod:`zipimport` in der " +"Standardbibliothek unterstützt wird, übernehmen die standardmäßigen " +"Pfadeintrags-Finder auch das Laden all dieser Dateitypen (mit Ausnahme von " +"gemeinsam genutzten Bibliotheken) aus ZIP-Dateien." msgid "" "Path entries need not be limited to file system locations. They can refer " "to URLs, database queries, or any other location that can be specified as a " "string." msgstr "" +"Pfadeinträge müssen sich nicht auf Speicherorte im Dateisystem beschränken. " +"Sie können sich auf URLs, Datenbankabfragen oder jeden anderen Speicherort " +"beziehen, der als Zeichenfolge angegeben werden kann." msgid "" "The path based finder provides additional hooks and protocols so that you " -"can extend and customize the types of searchable path entries. For example, " -"if you wanted to support path entries as network URLs, you could write a " +"can extend and customize the types of searchable path entries. For example," +" if you wanted to support path entries as network URLs, you could write a " "hook that implements HTTP semantics to find modules on the web. This hook " "(a callable) would return a :term:`path entry finder` supporting the " -"protocol described below, which was then used to get a loader for the module " -"from the web." -msgstr "" - -msgid "" -"A word of warning: this section and the previous both use the term *finder*, " -"distinguishing between them by using the terms :term:`meta path finder` and :" -"term:`path entry finder`. These two types of finders are very similar, " +"protocol described below, which was then used to get a loader for the module" +" from the web." +msgstr "" +"Der pfadbasierte Finder bietet zusätzliche Hooks und Protokolle, mit denen " +"Sie die Arten der durchsuchbaren Pfadeinträge erweitern und anpassen können." +" Wenn Sie beispielsweise Pfadeinträge als Netzwerk-URLs unterstützen " +"möchten, könnten Sie einen Hook schreiben, der HTTP-Semantik implementiert, " +"um Module im Internet zu finden. Dieser Hook (ein Callable) würde einen " +":term:`Pfadeintrags-Finder` zurückgeben, der das unten beschriebene " +"Protokoll unterstützt, mit dem dann ein Loader für das Modul aus dem Web " +"abgerufen würde." + +msgid "" +"A word of warning: this section and the previous both use the term *finder*," +" distinguishing between them by using the terms :term:`meta path finder` and" +" :term:`path entry finder`. These two types of finders are very similar, " "support similar protocols, and function in similar ways during the import " "process, but it's important to keep in mind that they are subtly different. " "In particular, meta path finders operate at the beginning of the import " "process, as keyed off the :data:`sys.meta_path` traversal." msgstr "" +"Eine Anmerkung: Sowohl in diesem Abschnitt als auch im vorherigen wird der " +"Begriff *Finder* verwendet, wobei durch die Begriffe :term:`Meta-Pfad-" +"Finder` und :term:`Pfad-Eintrag-Finder` zwischen ihnen unterschieden wird. " +"Diese beiden Arten von Findern sind sich sehr ähnlich, unterstützen ähnliche" +" Protokolle und funktionieren während des Importvorgangs auf ähnliche Weise," +" doch es ist wichtig zu beachten, dass sie sich in subtilen Punkten " +"unterscheiden. Insbesondere werden Meta-Pfad-Finder zu Beginn des " +"Importvorgangs ausgeführt, ausgehend von der Durchquerung des Verzeichnisses" +" :data:`sys.meta_path` ." msgid "" "By contrast, path entry finders are in a sense an implementation detail of " @@ -821,9 +1369,13 @@ msgid "" "removed from :data:`sys.meta_path`, none of the path entry finder semantics " "would be invoked." msgstr "" +"Im Gegensatz dazu sind Pfadeintrags-Finder gewissermaßen ein " +"Implementierungsdetail des pfadbasierten Finders, und tatsächlich würde, " +"wenn der pfadbasierte Finder aus :data:`sys.meta_path` entfernt würde, " +"keine der Semantiken der Pfadeintrags-Finder aufgerufen werden." msgid "Path entry finders" -msgstr "" +msgstr "Pfadeintrag-Suchfunktionen" msgid "" "The :term:`path based finder` is responsible for finding and loading Python " @@ -831,88 +1383,161 @@ msgid "" "entry`. Most path entries name locations in the file system, but they need " "not be limited to this." msgstr "" +"Der :term:`pfadbasierte Finder` ist dafür zuständig, Python-Module und " +"-Pakete zu finden und zu laden, deren Speicherort durch einen String als " +":term:`Pfadeintrag` angegeben wird. Die meisten Pfadeinträge bezeichnen " +"Speicherorte im Dateisystem, müssen sich jedoch nicht darauf beschränken." msgid "" -"As a meta path finder, the :term:`path based finder` implements the :meth:" -"`~importlib.abc.MetaPathFinder.find_spec` protocol previously described, " -"however it exposes additional hooks that can be used to customize how " -"modules are found and loaded from the :term:`import path`." +"As a meta path finder, the :term:`path based finder` implements the " +":meth:`~importlib.abc.MetaPathFinder.find_spec` protocol previously " +"described, however it exposes additional hooks that can be used to customize" +" how modules are found and loaded from the :term:`import path`." msgstr "" +"Als Meta-Pfadfinder implementiert der :term:`pfadbasierte Finder` das zuvor " +"beschriebene Protokoll :meth:`~importlib.abc.MetaPathFinder.find_spec`, " +"stellt jedoch zusätzliche Hooks bereit, mit denen sich die Art und Weise " +"anpassen lässt, wie Module über den :term:`Importpfad` gefunden und geladen " +"werden." msgid "" -"Three variables are used by the :term:`path based finder`, :data:`sys." -"path`, :data:`sys.path_hooks` and :data:`sys.path_importer_cache`. The " +"Three variables are used by the :term:`path based finder`, :data:`sys.path`," +" :data:`sys.path_hooks` and :data:`sys.path_importer_cache`. The " "``__path__`` attributes on package objects are also used. These provide " "additional ways that the import machinery can be customized." msgstr "" +"Der :term:`path based finder` verwendet drei Variablen: :data:`sys.path`, " +":data:`sys.path_hooks` und :data:`sys.path_importer_cache`. Zudem werden die" +" Attribute ``__path__`` der Paketobjekte herangezogen. Diese bieten " +"zusätzliche Möglichkeiten zur Anpassung des Importmechanismus." msgid "" ":data:`sys.path` contains a list of strings providing search locations for " "modules and packages. It is initialized from the :envvar:`PYTHONPATH` " "environment variable and various other installation- and implementation-" "specific defaults. Entries in :data:`sys.path` can name directories on the " -"file system, zip files, and potentially other \"locations\" (see the :mod:" -"`site` module) that should be searched for modules, such as URLs, or " +"file system, zip files, and potentially other \"locations\" (see the " +":mod:`site` module) that should be searched for modules, such as URLs, or " "database queries. Only strings should be present on :data:`sys.path`; all " "other data types are ignored." msgstr "" +":data:`sys.path` enthält eine Liste von Zeichenketten, die Suchpfade für " +"Module und Pakete angeben. Sie wird anhand der Umgebungsvariablen " +":envvar:`PYTHONPATH` sowie verschiedener anderer installations- und " +"implementierungsspezifischer Standardwerte initialisiert. Einträge in " +":data:`sys.path` können Verzeichnisse im Dateisystem, ZIP-Dateien und " +"möglicherweise andere „Speicherorte“ (siehe das Modul :mod:`site` `) " +"benennen, an denen nach Modulen gesucht werden soll, wie z. B. URLs oder " +"Datenbankabfragen. In :data:`sys.path`` dürfen nur Zeichenketten enthalten" +" sein; alle anderen Datentypen werden ignoriert." msgid "" "The :term:`path based finder` is a :term:`meta path finder`, so the import " "machinery begins the :term:`import path` search by calling the path based " "finder's :meth:`~importlib.machinery.PathFinder.find_spec` method as " -"described previously. When the ``path`` argument to :meth:`~importlib." -"machinery.PathFinder.find_spec` is given, it will be a list of string paths " -"to traverse - typically a package's ``__path__`` attribute for an import " -"within that package. If the ``path`` argument is ``None``, this indicates a " -"top level import and :data:`sys.path` is used." -msgstr "" +"described previously. When the ``path`` argument to " +":meth:`~importlib.machinery.PathFinder.find_spec` is given, it will be a " +"list of string paths to traverse - typically a package's ``__path__`` " +"attribute for an import within that package. If the ``path`` argument is " +"``None``, this indicates a top level import and :data:`sys.path` is used." +msgstr "" +"Der :term:`pfadbasierte Finder` ist ein :term:`Meta-Pfadfinder`, daher " +"beginnt der Importmechanismus die Suche nach dem :term:`Importpfad`, indem " +"er – wie zuvor beschrieben – die Methode " +":meth:`~importlib.machinery.PathFinder.find_spec` des pfadbasierten " +"Finders aufruft. Wenn das Argument ``path`` an " +":meth:`~importlib.machinery.PathFinder.find_spec` übergeben wird, handelt " +"es sich um eine Liste von String-Pfaden, die durchlaufen werden sollen – " +"typischerweise das Attribut ``__path__`` eines Pakets für einen Import " +"innerhalb dieses Pakets. Wenn das Argument ``path`` den Wert ``None``" +" hat, deutet dies auf einen Import auf oberster Ebene hin, und es wird " +":data:`sys.path` verwendet." msgid "" "The path based finder iterates over every entry in the search path, and for " -"each of these, looks for an appropriate :term:`path entry finder` (:class:" -"`~importlib.abc.PathEntryFinder`) for the path entry. Because this can be " -"an expensive operation (e.g. there may be ``stat()`` call overheads for this " -"search), the path based finder maintains a cache mapping path entries to " -"path entry finders. This cache is maintained in :data:`sys." -"path_importer_cache` (despite the name, this cache actually stores finder " -"objects rather than being limited to :term:`importer` objects). In this way, " -"the expensive search for a particular :term:`path entry` location's :term:" -"`path entry finder` need only be done once. User code is free to remove " -"cache entries from :data:`sys.path_importer_cache` forcing the path based " -"finder to perform the path entry search again." -msgstr "" +"each of these, looks for an appropriate :term:`path entry finder` " +"(:class:`~importlib.abc.PathEntryFinder`) for the path entry. Because this " +"can be an expensive operation (e.g. there may be ``stat()`` call overheads " +"for this search), the path based finder maintains a cache mapping path " +"entries to path entry finders. This cache is maintained in " +":data:`sys.path_importer_cache` (despite the name, this cache actually " +"stores finder objects rather than being limited to :term:`importer` " +"objects). In this way, the expensive search for a particular :term:`path " +"entry` location's :term:`path entry finder` need only be done once. User " +"code is free to remove cache entries from :data:`sys.path_importer_cache` " +"forcing the path based finder to perform the path entry search again." +msgstr "" +"Der pfadbasierte Finder durchläuft jeden Eintrag im Suchpfad und sucht für " +"jeden dieser Einträge nach einem geeigneten :term:`Pfadeintrags-Finder` " +"(:class:`~importlib.abc.PathEntryFinder`) für den Pfadeintrag. Da dies ein " +"ressourcenintensiver Vorgang sein kann (z. B. können bei dieser Suche " +"Overheads durch ``stat()`` “-Aufrufe entstehen), verwaltet der " +"pfadbasierte Finder einen Cache, der Pfadeinträge den Pfadeintrags-Findern " +"zuordnet. Dieser Cache wird in :data:`sys.path_importer_cache` " +"verwaltet (trotz des Namens speichert dieser Cache tatsächlich Finder-" +"Objekte und ist nicht auf :term:`Importer`-Objekte beschränkt). Auf diese " +"Weise muss die aufwendige Suche nach dem :term:`Pfadeintrags-Finder` für " +"einen bestimmten :term:`Pfadeintrag` nur einmal durchgeführt werden. " +"Benutzercode kann Cache-Einträge aus :data:`sys.path_importer_cache` " +"entfernen und so den pfadbasierten Finder dazu zwingen, die Suche nach dem " +"Pfadeintrag erneut durchzuführen." msgid "" "If the path entry is not present in the cache, the path based finder " -"iterates over every callable in :data:`sys.path_hooks`. Each of the :term:" -"`path entry hooks ` in this list is called with a single " -"argument, the path entry to be searched. This callable may either return a :" -"term:`path entry finder` that can handle the path entry, or it may raise :" -"exc:`ImportError`. An :exc:`ImportError` is used by the path based finder " -"to signal that the hook cannot find a :term:`path entry finder` for that :" -"term:`path entry`. The exception is ignored and :term:`import path` " +"iterates over every callable in :data:`sys.path_hooks`. Each of the " +":term:`path entry hooks ` in this list is called with a " +"single argument, the path entry to be searched. This callable may either " +"return a :term:`path entry finder` that can handle the path entry, or it may" +" raise :exc:`ImportError`. An :exc:`ImportError` is used by the path based " +"finder to signal that the hook cannot find a :term:`path entry finder` for " +"that :term:`path entry`. The exception is ignored and :term:`import path` " "iteration continues. The hook should expect either a string or bytes " "object; the encoding of bytes objects is up to the hook (e.g. it may be a " "file system encoding, UTF-8, or something else), and if the hook cannot " "decode the argument, it should raise :exc:`ImportError`." msgstr "" +"Ist der Pfadeintrag nicht im Cache vorhanden, durchläuft der pfadbasierte " +"Finder alle aufrufbaren Funktionen in :data:`sys.path_hooks`. Jeder der " +":term:`Pfadeintrag-Hooks ` in dieser Liste wird mit einem " +"einzigen Argument aufgerufen, nämlich dem zu durchsuchenden Pfadeintrag. " +"Diese aufrufbare Funktion kann entweder einen :term:`Pfadeintrags-Finder` " +"zurückgeben, der den Pfadeintrag verarbeiten kann, oder sie kann eine " +":exc:`ImportError` auslösen. Ein :exc:`ImportError` wird vom pfadbasierten " +"Finder verwendet, um zu signalisieren, dass der Hook keinen " +":term:`Pfadeintrags-Finder` für diesen :term:`Pfadeintrag` finden kann. Die" +" Ausnahme wird ignoriert und die Iteration über den :term:`Importpfad` wird " +"fortgesetzt. Der Hook sollte entweder eine Zeichenkette oder ein Byte-" +"Objekt erwarten; die Kodierung von Byte-Objekten bleibt dem Hook überlassen " +"(z. B. kann es sich um eine Dateisystemkodierung, UTF-8 oder etwas anderes " +"handeln), und wenn der Hook das Argument nicht dekodieren kann, sollte er " +"eine :exc:`ImportError` “-Ausnahme auslösen." msgid "" "If :data:`sys.path_hooks` iteration ends with no :term:`path entry finder` " -"being returned, then the path based finder's :meth:`~importlib.machinery." -"PathFinder.find_spec` method will store ``None`` in :data:`sys." -"path_importer_cache` (to indicate that there is no finder for this path " -"entry) and return ``None``, indicating that this :term:`meta path finder` " -"could not find the module." -msgstr "" - -msgid "" -"If a :term:`path entry finder` *is* returned by one of the :term:`path entry " -"hook` callables on :data:`sys.path_hooks`, then the following protocol is " +"being returned, then the path based finder's " +":meth:`~importlib.machinery.PathFinder.find_spec` method will store ``None``" +" in :data:`sys.path_importer_cache` (to indicate that there is no finder for" +" this path entry) and return ``None``, indicating that this :term:`meta path" +" finder` could not find the module." +msgstr "" +"Wenn die Iteration von :data:`sys.path_hooks` ohne Rückgabe eines " +":term:`Pfadeintrags-Finders` endet, speichert die Methode " +":meth:`~importlib.machinery.PathFinder.find_spec` des pfadbasierten Finders " +"``None`` in :data:`sys.path_importer_cache` (um anzuzeigen, dass es keinen " +"Finder für diesen Pfadeintrag gibt) und gibt ``None`` zurück, was darauf " +"hinweist, dass dieser :term:`Meta-Pfad-Finder` das Modul nicht finden " +"konnte." + +msgid "" +"If a :term:`path entry finder` *is* returned by one of the :term:`path entry" +" hook` callables on :data:`sys.path_hooks`, then the following protocol is " "used to ask the finder for a module spec, which is then used when loading " "the module." msgstr "" +"Wenn von einem der auf :data:`sys.path_hooks` aufgeführten :term:`path entry" +" hook`-Aufrufobjekte ein :term:`path entry finder` *zurückgegeben* wird, " +"wird das folgende Protokoll verwendet, um vom Finder eine Modulspezifikation" +" abzufragen, die dann beim Laden des Moduls verwendet wird." msgid "" "The current working directory -- denoted by an empty string -- is handled " @@ -920,51 +1545,85 @@ msgid "" "current working directory cannot be determined or is found not to exist, no " "value is stored in :data:`sys.path_importer_cache`. Second, the value for " "the current working directory is looked up fresh for each module lookup. " -"Third, the path used for :data:`sys.path_importer_cache` and returned by :" -"meth:`importlib.machinery.PathFinder.find_spec` will be the actual current " +"Third, the path used for :data:`sys.path_importer_cache` and returned by " +":meth:`importlib.machinery.PathFinder.find_spec` will be the actual current " "working directory and not the empty string." msgstr "" +"Das aktuelle Arbeitsverzeichnis – gekennzeichnet durch eine leere " +"Zeichenkette – wird etwas anders behandelt als andere Einträge unter " +":data:`sys.path`. Erstens: Wenn das aktuelle Arbeitsverzeichnis nicht " +"ermittelt werden kann oder nicht existiert, wird kein Wert unter " +":data:`sys.path_importer_cache` gespeichert. Zweitens: Der Wert für das " +"aktuelle Arbeitsverzeichnis wird bei jedem Modulaufruf neu ermittelt. " +"Drittens ist der Pfad, der für :data:`sys.path_importer_cache` verwendet" +" und von :meth:`importlib.machinery.PathFinder.find_spec` zurückgegeben " +"wird, das tatsächlich aktuelle Arbeitsverzeichnis und nicht die leere " +"Zeichenkette." msgid "Path entry finder protocol" -msgstr "" +msgstr "Protokoll zur Ermittlung von Pfadeinträgen" msgid "" "In order to support imports of modules and initialized packages and also to " -"contribute portions to namespace packages, path entry finders must implement " -"the :meth:`~importlib.abc.PathEntryFinder.find_spec` method." +"contribute portions to namespace packages, path entry finders must implement" +" the :meth:`~importlib.abc.PathEntryFinder.find_spec` method." msgstr "" +"Um das Importieren von Modulen und initialisierten Paketen zu unterstützen " +"und zudem Teile zu Namespace-Paketen beizusteuern, müssen Pfadefinder die " +"Methode :meth:`~importlib.abc.PathEntryFinder.find_spec` implementieren." msgid "" ":meth:`~importlib.abc.PathEntryFinder.find_spec` takes two arguments: the " -"fully qualified name of the module being imported, and the (optional) target " -"module. ``find_spec()`` returns a fully populated spec for the module. This " -"spec will always have \"loader\" set (with one exception)." +"fully qualified name of the module being imported, and the (optional) target" +" module. ``find_spec()`` returns a fully populated spec for the module. " +"This spec will always have \"loader\" set (with one exception)." msgstr "" +":meth:`~importlib.abc.PathEntryFinder.find_spec` nimmt zwei Argumente " +"entgegen: den vollqualifizierten Namen des zu importierenden Moduls und das " +"(optionale) Zielmodul. ``find_spec()`` gibt eine vollständig " +"ausgefüllte Spezifikation für das Modul zurück. In dieser Spezifikation ist " +"„loader“ immer gesetzt (mit einer Ausnahme)." msgid "" -"To indicate to the import machinery that the spec represents a namespace :" -"term:`portion`, the path entry finder sets ``submodule_search_locations`` to " -"a list containing the portion." +"To indicate to the import machinery that the spec represents a namespace " +":term:`portion`, the path entry finder sets ``submodule_search_locations`` " +"to a list containing the portion." msgstr "" +"Um der Import-Maschinerie mitzuteilen, dass die Spezifikation einen " +"Namensraum :term:`portion` darstellt, setzt der Pfadeintrags-Finder " +"``submodule_search_locations`` auf eine Liste, die diesen Teil enthält." msgid "" -":meth:`~importlib.abc.PathEntryFinder.find_spec` replaced :meth:`!" -"find_loader` and :meth:`!find_module`, both of which are now deprecated, but " -"will be used if ``find_spec()`` is not defined." +":meth:`~importlib.abc.PathEntryFinder.find_spec` replaced " +":meth:`!find_loader` and :meth:`!find_module`, both of which are now " +"deprecated, but will be used if ``find_spec()`` is not defined." msgstr "" +":meth:`~importlib.abc.PathEntryFinder.find_spec` Ersetzt " +":meth:`!find_loader` und :meth:`!find_module`, die beide mittlerweile " +"veraltet sind, jedoch verwendet werden, wenn ``find_spec()`` nicht definiert" +" ist." msgid "" "Older path entry finders may implement one of these two deprecated methods " -"instead of ``find_spec()``. The methods are still respected for the sake of " -"backward compatibility. However, if ``find_spec()`` is implemented on the " +"instead of ``find_spec()``. The methods are still respected for the sake of" +" backward compatibility. However, if ``find_spec()`` is implemented on the " "path entry finder, the legacy methods are ignored." msgstr "" +"Ältere Pfadeintrags-Finder verwenden möglicherweise eine dieser beiden " +"veralteten Methoden anstelle von ``find_spec()``. Aus Gründen der " +"Abwärtskompatibilität werden diese Methoden weiterhin berücksichtigt. Wenn " +"jedoch ``find_spec()`` im Pfadeintrags-Finder implementiert ist, werden " +"die veralteten Methoden ignoriert." msgid "" ":meth:`!find_loader` takes one argument, the fully qualified name of the " "module being imported. ``find_loader()`` returns a 2-tuple where the first " "item is the loader and the second item is a namespace :term:`portion`." msgstr "" +":meth:`!find_loader` nimmt ein Argument entgegen, nämlich den " +"vollqualifizierten Namen des zu importierenden Moduls. ``find_loader()`` " +"` gibt ein 2-Tupel zurück, dessen erstes Element der Loader und dessen " +"zweites Element ein Namespace-Teil :term:`portion` ist." msgid "" "For backwards compatibility with other implementations of the import " @@ -974,58 +1633,91 @@ msgid "" "(they are expected to record the appropriate path information from the " "initial call to the path hook)." msgstr "" +"Aus Gründen der Abwärtskompatibilität mit anderen Implementierungen des " +"Importprotokolls unterstützen viele Pfadeintrags-Finder ebenfalls dieselbe " +"traditionelle Methode ``find_module()``, die auch von Meta-Pfad-Findern " +"unterstützt wird. Die Methoden ``find_module()`` der Pfadeintrags-Finder" +" werden jedoch niemals mit einem Argument vom Typ ``path`` aufgerufen " +"(es wird erwartet, dass sie die entsprechenden Pfadinformationen aus dem " +"ersten Aufruf des Pfad-Hooks erfassen)." msgid "" -"The ``find_module()`` method on path entry finders is deprecated, as it does " -"not allow the path entry finder to contribute portions to namespace " +"The ``find_module()`` method on path entry finders is deprecated, as it does" +" not allow the path entry finder to contribute portions to namespace " "packages. If both ``find_loader()`` and ``find_module()`` exist on a path " "entry finder, the import system will always call ``find_loader()`` in " "preference to ``find_module()``." msgstr "" +"Die Methode ``find_module()`` bei Pfadeintragsfindern ist veraltet, da " +"sie es dem Pfadeintragsfinder nicht ermöglicht, Teile zu Namespace-Paketen " +"beizusteuern. Wenn bei einem Pfadeintragsfinder sowohl ``find_loader()`` “" +" als auch ``find_module()`` vorhanden sind, ruft das Import-System immer" +" ``find_loader()`` vorrangig vor ``find_module()`` auf." msgid "" "Calls to :meth:`!find_module` and :meth:`!find_loader` by the import system " "will raise :exc:`ImportWarning`." msgstr "" +"Aufrufe von :meth:`!find_module` und :meth:`!find_loader` durch das " +"Importsystem lösen den Fehler :exc:`ImportWarning` aus." msgid "``find_module()`` and ``find_loader()`` have been removed." -msgstr "" +msgstr "``find_module()`` und ``find_loader()`` wurden entfernt." msgid "Replacing the standard import system" -msgstr "" +msgstr "Ersetzen des Standard-Importsystems" msgid "" "The most reliable mechanism for replacing the entire import system is to " "delete the default contents of :data:`sys.meta_path`, replacing them " "entirely with a custom meta path hook." msgstr "" +"Die zuverlässigste Methode, das gesamte Import-System zu ersetzen, besteht " +"darin, den Standardinhalt von :data:`sys.meta_path` zu löschen und ihn " +"vollständig durch einen benutzerdefinierten Meta-Path-Hook zu ersetzen." msgid "" -"If it is acceptable to only alter the behaviour of import statements without " -"affecting other APIs that access the import system, then replacing the " -"builtin :func:`__import__` function may be sufficient. This technique may " -"also be employed at the module level to only alter the behaviour of import " -"statements within that module." +"If it is acceptable to only alter the behaviour of import statements without" +" affecting other APIs that access the import system, then replacing the " +"builtin :func:`__import__` function may be sufficient." msgstr "" +"Wenn es akzeptabel ist, lediglich das Verhalten von Importanweisungen zu " +"ändern, ohne andere APIs zu beeinträchtigen, die auf das Importsystem " +"zugreifen, könnte es ausreichen, die integrierte Funktion " +":func:`__import__` zu ersetzen." msgid "" "To selectively prevent the import of some modules from a hook early on the " -"meta path (rather than disabling the standard import system entirely), it is " -"sufficient to raise :exc:`ModuleNotFoundError` directly from :meth:" -"`~importlib.abc.MetaPathFinder.find_spec` instead of returning ``None``. The " -"latter indicates that the meta path search should continue, while raising an " -"exception terminates it immediately." -msgstr "" +"meta path (rather than disabling the standard import system entirely), it is" +" sufficient to raise :exc:`ModuleNotFoundError` directly from " +":meth:`~importlib.abc.MetaPathFinder.find_spec` instead of returning " +"``None``. The latter indicates that the meta path search should continue, " +"while raising an exception terminates it immediately." +msgstr "" +"Um den Import bestimmter Module über einen Hook zu Beginn des Meta-Pfads " +"gezielt zu verhindern (anstatt das Standard-Import-System vollständig zu " +"deaktivieren), reicht es aus, direkt von " +":meth:`~importlib.abc.MetaPathFinder.find_spec` aus eine " +":exc:`ModuleNotFoundError` “-Ausnahme auszulösen, anstatt ``None`` " +"zurückzugeben. Letzteres signalisiert, dass die Suche im Meta-Pfad " +"fortgesetzt werden soll, während das Auslösen einer Ausnahme diese sofort " +"beendet." msgid "Package Relative Imports" -msgstr "" +msgstr "Paketbezogene Importe" msgid "" -"Relative imports use leading dots. A single leading dot indicates a relative " -"import, starting with the current package. Two or more leading dots indicate " -"a relative import to the parent(s) of the current package, one level per dot " -"after the first. For example, given the following package layout::" +"Relative imports use leading dots. A single leading dot indicates a relative" +" import, starting with the current package. Two or more leading dots " +"indicate a relative import to the parent(s) of the current package, one " +"level per dot after the first. For example, given the following package " +"layout::" msgstr "" +"Relative Importe werden durch führende Punkte gekennzeichnet. Ein einzelner " +"führender Punkt kennzeichnet einen relativen Import, der vom aktuellen Paket" +" ausgeht. Zwei oder mehr führende Punkte kennzeichnen einen relativen Import" +" zu den übergeordneten Paketen des aktuellen Pakets, wobei jeder Punkt nach " +"dem ersten für eine Ebene steht. Beispielsweise bei folgender Paketstruktur:" msgid "" "package/\n" @@ -1039,11 +1731,23 @@ msgid "" " moduleZ.py\n" " moduleA.py" msgstr "" +"package/\n" +" __init__.py\n" +" subpackage1/\n" +" __init__.py\n" +" moduleX.py\n" +" moduleY.py\n" +" subpackage2/\n" +" __init__.py\n" +" moduleZ.py\n" +" moduleA.py" msgid "" "In either ``subpackage1/moduleX.py`` or ``subpackage1/__init__.py``, the " "following are valid relative imports::" msgstr "" +"Sowohl in ``subpackage1/moduleX.py`` als auch in " +"``subpackage1/__init__.py`` sind die folgenden relativen Importe gültig:" msgid "" "from .moduleY import spam\n" @@ -1059,67 +1763,97 @@ msgid "" "syntax, but relative imports may only use the second form; the reason for " "this is that::" msgstr "" +"Absolute Importe können entweder die Syntax ``import <>`` oder ``from " +"<> import <>`` verwenden, relative Importe hingegen dürfen nur die zweite " +"Form verwenden; der Grund dafür ist, dass::" msgid "import XXX.YYY.ZZZ" -msgstr "" +msgstr "import XXX.YYY.ZZZ" msgid "" "should expose ``XXX.YYY.ZZZ`` as a usable expression, but .moduleY is not a " "valid expression." msgstr "" +"``XXX.YYY.ZZZ`` sollte als gültiger Ausdruck verfügbar sein, aber .moduleY " +"ist kein gültiger Ausdruck." msgid "Special considerations for __main__" -msgstr "" +msgstr "Besondere Hinweise zu __main__" msgid "" "The :mod:`__main__` module is a special case relative to Python's import " "system. As noted :ref:`elsewhere `, the ``__main__`` module is " -"directly initialized at interpreter startup, much like :mod:`sys` and :mod:" -"`builtins`. However, unlike those two, it doesn't strictly qualify as a " -"built-in module. This is because the manner in which ``__main__`` is " +"directly initialized at interpreter startup, much like :mod:`sys` and " +":mod:`builtins`. However, unlike those two, it doesn't strictly qualify as " +"a built-in module. This is because the manner in which ``__main__`` is " "initialized depends on the flags and other options with which the " "interpreter is invoked." msgstr "" +"Das Modul :mod:`__main__` stellt im Zusammenhang mit dem Import-System " +"von Python einen Sonderfall dar. Wie bereits an anderer Stelle erwähnt " +":ref:` `, wird das Modul ``__main__`` direkt beim Start des " +"Interpreters initialisiert, ähnlich wie :mod:`sys` und :mod:`builtins`" +" “. Im Gegensatz zu diesen beiden Modulen gilt es jedoch nicht streng " +"genommen als integriertes Modul. Dies liegt daran, dass die Art und Weise, " +"wie ``__main__`` initialisiert wird, von den Flags und anderen Optionen " +"abhängt, mit denen der Interpreter aufgerufen wird." msgid "__main__.__spec__" -msgstr "" +msgstr "__main__.__spec__" msgid "" "Depending on how :mod:`__main__` is initialized, ``__main__.__spec__`` gets " "set appropriately or to ``None``." msgstr "" +"Je nachdem, wie :mod:`__main__` initialisiert wird, wird " +"``__main__.__spec__`` entsprechend gesetzt oder auf ``None`` ." msgid "" "When Python is started with the :option:`-m` option, ``__spec__`` is set to " -"the module spec of the corresponding module or package. ``__spec__`` is also " -"populated when the ``__main__`` module is loaded as part of executing a " +"the module spec of the corresponding module or package. ``__spec__`` is also" +" populated when the ``__main__`` module is loaded as part of executing a " "directory, zipfile or other :data:`sys.path` entry." msgstr "" +"Wenn Python mit der Option :option:`-m` gestartet wird, wird " +"``__spec__`` auf die Modul-Spezifikation des entsprechenden Moduls oder " +"Pakets gesetzt. ``__spec__`` wird ebenfalls gefüllt, wenn das Modul " +"``__main__`` im Rahmen der Ausführung eines Eintrags vom Typ \"directory\“, " +"\"zipfile\“ oder eines anderen Eintrags vom Typ :data:`sys.path` geladen " +"wird." msgid "" -"In :ref:`the remaining cases ` ``__main__." -"__spec__`` is set to ``None``, as the code used to populate the :mod:" -"`__main__` does not correspond directly with an importable module:" +"In :ref:`the remaining cases ` " +"``__main__.__spec__`` is set to ``None``, as the code used to populate the " +":mod:`__main__` does not correspond directly with an importable module:" msgstr "" +"In :ref:`den übrigen Fällen ` " +"``__main__.__spec__`` ist auf ``None`` gesetzt, da der Code, der zum " +"Befüllen der :mod:`__main__` verwendet wird, nicht direkt einem " +"importierbaren Modul entspricht:" msgid "interactive prompt" -msgstr "" +msgstr "interaktive Eingabeaufforderung" msgid ":option:`-c` option" -msgstr "" +msgstr ":option:`-c` Option" msgid "running from stdin" -msgstr "" +msgstr "Ausführung über stdin" msgid "running directly from a source or bytecode file" -msgstr "" +msgstr "direkt aus einer Quell- oder Bytecode-Datei ausgeführt" msgid "" "Note that ``__main__.__spec__`` is always ``None`` in the last case, *even " -"if* the file could technically be imported directly as a module instead. Use " -"the :option:`-m` switch if valid module metadata is desired in :mod:" -"`__main__`." +"if* the file could technically be imported directly as a module instead. Use" +" the :option:`-m` switch if valid module metadata is desired in " +":mod:`__main__`." msgstr "" +"Beachten Sie, dass ``__main__.__spec__`` im letzten Fall immer " +"``None`` ist, *selbst wenn* die Datei technisch gesehen stattdessen direkt" +" als Modul importiert werden könnte. Verwenden Sie den Schalter " +":option:`-m`, wenn gültige Modul-Metadaten in :mod:`__main__` " +"gewünscht sind." msgid "" "Note also that even when ``__main__`` corresponds with an importable module " @@ -1128,63 +1862,96 @@ msgid "" "__name__ == \"__main__\":`` checks only execute when the module is used to " "populate the ``__main__`` namespace, and not during normal import." msgstr "" +"Beachten Sie außerdem, dass selbst wenn ``__main__`` einem " +"importierbaren Modul entspricht und ``__main__.__spec__`` entsprechend " +"gesetzt ist, diese dennoch als *unterschiedliche* Module betrachtet werden. " +"Dies liegt daran, dass Blöcke, die durch ``if __name__ == \"__main__\":`` " +"“-Prüfungen geschützt sind, nur dann ausgeführt werden, wenn das Modul zum " +"Befüllen des Namensraums ``__main__`` verwendet wird, nicht jedoch " +"während eines normalen Imports." msgid "References" -msgstr "" +msgstr "Literaturverzeichnis" msgid "" "The import machinery has evolved considerably since Python's early days. " -"The original `specification for packages `_ is still available to read, although some details have changed " -"since the writing of that document." +"The original `specification for packages " +"`_ is still available to read, " +"although some details have changed since the writing of that document." msgstr "" +"Die Importmechanismen haben sich seit den Anfängen von Python erheblich " +"weiterentwickelt. Die ursprüngliche \"Spezifikation für Pakete\“ " +"`_ kann nach wie vor eingesehen" +" werden, auch wenn sich einige Details seit der Erstellung dieses Dokuments " +"geändert haben." msgid "" "The original specification for :data:`sys.meta_path` was :pep:`302`, with " "subsequent extension in :pep:`420`." msgstr "" +"Die ursprüngliche Spezifikation für :data:`sys.meta_path` war unter " +":pep:`302` zu finden und wurde später unter :pep:`420` erweitert." msgid "" ":pep:`420` introduced :term:`namespace packages ` for " -"Python 3.3. :pep:`420` also introduced the :meth:`!find_loader` protocol as " -"an alternative to :meth:`!find_module`." +"Python 3.3. :pep:`420` also introduced the :meth:`!find_loader` protocol as" +" an alternative to :meth:`!find_module`." msgstr "" +":pep:`420` In Python 3.3 wurden :term:`Namespace-Pakete `" +" eingeführt. In der Version :pep:`420` wurde außerdem das Protokoll " +":meth:`!find_loader` als Alternative zu :meth:`!find_module` eingeführt." msgid "" ":pep:`366` describes the addition of the ``__package__`` attribute for " "explicit relative imports in main modules." msgstr "" +":pep:`366` beschreibt die Einführung des Attributs ``__package__`` für " +"explizite relative Importe in Hauptmodulen." msgid "" ":pep:`328` introduced absolute and explicit relative imports and initially " "proposed ``__name__`` for semantics :pep:`366` would eventually specify for " "``__package__``." msgstr "" +":pep:`328` führte absolute und explizite relative Importe ein und schlug " +"zunächst ``__name__`` als Semantik vor, die :pep:`366` schließlich " +"für ``__package__`` festlegen würde." msgid ":pep:`338` defines executing modules as scripts." -msgstr "" +msgstr ":pep:`338` definiert die Ausführung von Modulen als Skripte." msgid "" ":pep:`451` adds the encapsulation of per-module import state in spec " "objects. It also off-loads most of the boilerplate responsibilities of " -"loaders back onto the import machinery. These changes allow the deprecation " -"of several APIs in the import system and also addition of new methods to " +"loaders back onto the import machinery. These changes allow the deprecation" +" of several APIs in the import system and also addition of new methods to " "finders and loaders." msgstr "" +":pep:`451` Fügt die Kapselung des Importstatus pro Modul in " +"Spezifikationsobjekten hinzu. Zudem werden die meisten Routineaufgaben der " +"Loader wieder auf die Importmechanismen verlagert. Diese Änderungen " +"ermöglichen die Abkündigung mehrerer APIs im Importsystem sowie die " +"Hinzufügung neuer Methoden zu Findern und Loadern." msgid "Footnotes" msgstr "Fußnoten" msgid "See :class:`types.ModuleType`." -msgstr "" +msgstr "Siehe :class:`types.ModuleType`." msgid "" "The importlib implementation avoids using the return value directly. " -"Instead, it gets the module object by looking the module name up in :data:" -"`sys.modules`. The indirect effect of this is that an imported module may " -"replace itself in :data:`sys.modules`. This is implementation-specific " -"behavior that is not guaranteed to work in other Python implementations." -msgstr "" +"Instead, it gets the module object by looking the module name up in " +":data:`sys.modules`. The indirect effect of this is that an imported module" +" may replace itself in :data:`sys.modules`. This is implementation-specific" +" behavior that is not guaranteed to work in other Python implementations." +msgstr "" +"Die \"importlib\“-Implementierung vermeidet die direkte Verwendung des " +"Rückgabewerts. Stattdessen wird das Modulobjekt abgerufen, indem der " +"Modulname unter :data:`sys.modules` nachgeschlagen wird. Dies hat indirekt " +"zur Folge, dass ein importiertes Modul sich selbst unter :data:`sys.modules`" +" ersetzen kann. Dies ist ein implementierungsspezifisches Verhalten, dessen " +"Funktionieren in anderen Python-Implementierungen nicht garantiert ist." msgid "import machinery" msgstr "" From aca26ca4d58d8897239b8daa8faa7cd5549e126e Mon Sep 17 00:00:00 2001 From: JystBreisgau Date: Sun, 16 Aug 2026 17:27:14 +0200 Subject: [PATCH 2/8] Translating into German started. /reference/executionmodel.po --- reference/executionmodel.po | 758 +++++++++++++++++++++++++++--------- 1 file changed, 583 insertions(+), 175 deletions(-) diff --git a/reference/executionmodel.po b/reference/executionmodel.po index 12501ee7..2c65c797 100644 --- a/reference/executionmodel.po +++ b/reference/executionmodel.po @@ -21,114 +21,159 @@ msgstr "" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" + msgid "Execution model" -msgstr "" +msgstr "Ausführungsmodell" msgid "Structure of a program" -msgstr "" +msgstr "Aufbau eines Programms" msgid "" "A Python program is constructed from code blocks. A :dfn:`block` is a piece " -"of Python program text that is executed as a unit. The following are blocks: " -"a module, a function body, and a class definition. Each command typed " +"of Python program text that is executed as a unit. The following are blocks:" +" a module, a function body, and a class definition. Each command typed " "interactively is a block. A script file (a file given as standard input to " "the interpreter or specified as a command line argument to the interpreter) " "is a code block. A script command (a command specified on the interpreter " "command line with the :option:`-c` option) is a code block. A module run as " -"a top level script (as module ``__main__``) from the command line using a :" -"option:`-m` argument is also a code block. The string argument passed to the " -"built-in functions :func:`eval` and :func:`exec` is a code block." -msgstr "" +"a top level script (as module ``__main__``) from the command line using a " +":option:`-m` argument is also a code block. The string argument passed to " +"the built-in functions :func:`eval` and :func:`exec` is a code block." +msgstr "" +"Ein Python-Programm setzt sich aus Codeblöcken zusammen. Ein :dfn:`Block` " +"ist ein Teil des Python-Programmtextes, der als Einheit ausgeführt wird. Zu " +"den Blöcken gehören: ein Modul, ein Funktionskörper und eine " +"Klassendefinition. Jeder interaktiv eingegebene Befehl ist ein Block. Eine " +"Skriptdatei (eine Datei, die dem Interpreter als Standardeingabe übergeben " +"oder als Befehlszeilenargument für den Interpreter angegeben wird) ist ein " +"Codeblock. Ein Skriptbefehl (ein Befehl, der in der Befehlszeile des " +"Interpreters mit der Option :option:`-c` angegeben wird) ist ein " +"Codeblock. Ein Modul, das als Skript der obersten Ebene (als Modul " +"``__main__`` “) über die Befehlszeile mit dem Argument :option:`-m` " +"ausgeführt wird, ist ebenfalls ein Codeblock. Das an die integrierten " +"Funktionen :func:`eval` und :func:`exec` übergebene " +"Zeichenfolgenargument ist ein Codeblock." msgid "" "A code block is executed in an :dfn:`execution frame`. A frame contains " "some administrative information (used for debugging) and determines where " "and how execution continues after the code block's execution has completed." msgstr "" +"Ein Codeblock wird in einem :dfn:`Ausführungsrahmen` ausgeführt. Ein Rahmen " +"enthält einige Verwaltungsinformationen (die zur Fehlersuche dienen) und " +"legt fest, wo und wie die Ausführung fortgesetzt wird, nachdem die " +"Ausführung des Codeblocks abgeschlossen ist." msgid "Naming and binding" -msgstr "" +msgstr "Benennung und Zuordnung" msgid "Binding of names" -msgstr "" +msgstr "Namensbindung" msgid "" ":dfn:`Names` refer to objects. Names are introduced by name binding " "operations." msgstr "" +":dfn:`Namen` beziehen sich auf Objekte. Namen werden durch " +"Namensbindungsoperationen eingeführt." msgid "The following constructs bind names:" -msgstr "" +msgstr "Die folgenden Konstrukte binden Namen:" msgid "formal parameters to functions," -msgstr "" +msgstr "Formale Parameter von Funktionen," msgid "class definitions," -msgstr "" +msgstr "Klassendefinitionen," msgid "function definitions," -msgstr "" +msgstr "Funktionsdefinitionen," msgid "assignment expressions," -msgstr "" +msgstr "Zuweisungsausdrücke," msgid "" ":ref:`targets ` that are identifiers if occurring in an " "assignment:" msgstr "" +":ref:`Ziele `, die als Bezeichner gelten, wenn sie in einer " +"Zuweisung vorkommen:" msgid ":keyword:`for` loop header," -msgstr "" +msgstr ":keyword:`for` Schleifenkopf," msgid "" "after :keyword:`!as` in a :keyword:`with` statement, :keyword:`except` " "clause, :keyword:`except* ` clause, or in the as-pattern in " "structural pattern matching," msgstr "" +"nach :keyword:`!as` in einer :keyword:`with` -Anweisung, einer " +":keyword:`except` -Klausel, einer :keyword:`except* ` " +"-Klausel oder im \"as\“-Muster beim strukturellen Musterabgleich," msgid "in a capture pattern in structural pattern matching" -msgstr "" +msgstr "in einem Erfassungsmuster beim strukturellen Musterabgleich" msgid ":keyword:`import` statements." -msgstr "" +msgstr ":keyword:`import` Aussagen." msgid ":keyword:`type` statements." -msgstr "" +msgstr ":keyword:`type` Aussagen." msgid ":ref:`type parameter lists `." -msgstr "" +msgstr ":ref:`Typ-Parameterlisten `." msgid "" -"The :keyword:`!import` statement of the form ``from ... import *`` binds all " -"names defined in the imported module, except those beginning with an " +"The :keyword:`!import` statement of the form ``from ... import *`` binds all" +" names defined in the imported module, except those beginning with an " "underscore. This form may only be used at the module level." msgstr "" +"Die Anweisung :keyword:`!import` in der Form ``from ... import *`` " +"bindet alle im importierten Modul definierten Namen, mit Ausnahme " +"derjenigen, die mit einem Unterstrich beginnen. Diese Form darf nur auf " +"Modulebene verwendet werden." msgid "" "A target occurring in a :keyword:`del` statement is also considered bound " "for this purpose (though the actual semantics are to unbind the name)." msgstr "" +"Ein Ziel, das in einer Anweisung vom Typ :keyword:`del` vorkommt, gilt " +"für diesen Zweck ebenfalls als gebunden (auch wenn die eigentliche Semantik " +"darin besteht, die Bindung des Namens aufzuheben)." msgid "" -"Each assignment or import statement occurs within a block defined by a class " -"or function definition or at the module level (the top-level code block)." +"Each assignment or import statement occurs within a block defined by a class" +" or function definition or at the module level (the top-level code block)." msgstr "" +"Jede Zuweisungs- oder Importanweisung erfolgt innerhalb eines Blocks, der " +"durch eine Klassen- oder Funktionsdefinition definiert ist, oder auf " +"Modulebene (dem Code-Block der obersten Ebene)." msgid "" "If a name is bound in a block, it is a local variable of that block, unless " -"declared as :keyword:`nonlocal` or :keyword:`global`. If a name is bound at " -"the module level, it is a global variable. (The variables of the module " -"code block are local and global.) If a variable is used in a code block but " -"not defined there, it is a :term:`free variable`." +"declared as :keyword:`nonlocal` or :keyword:`global`. If a name is bound at" +" the module level, it is a global variable. (The variables of the module " +"code block are local and global.) If a variable is used in a code block but" +" not defined there, it is a :term:`free variable`." msgstr "" +"Wird ein Name in einem Block gebunden, handelt es sich um eine lokale " +"Variable dieses Blocks, sofern er nicht als :keyword:`nonlocal` oder " +":keyword:`global` deklariert wurde. Wird ein Name auf Modulebene gebunden," +" handelt es sich um eine globale Variable. (Die Variablen des Modul-" +"Codeblocks sind sowohl lokal als auch global.) Wird eine Variable in einem " +"Codeblock verwendet, dort aber nicht definiert, handelt es sich um eine " +":term:`freie Variable`." msgid "" "Each occurrence of a name in the program text refers to the :dfn:`binding` " "of that name established by the following name resolution rules." msgstr "" +"Jedes Vorkommen eines Namens im Programmtext bezieht sich auf die " +":dfn:`Bindung` dieses Namens, die durch die folgenden Namensauflösungsregeln" +" festgelegt wird." msgid "Resolution of names" -msgstr "" +msgstr "Namensauflösung" msgid "" "A :dfn:`scope` defines the visibility of a name within a block. If a local " @@ -137,24 +182,42 @@ msgid "" "contained within the defining one, unless a contained block introduces a " "different binding for the name." msgstr "" +"Ein :dfn:`Gültigkeitsbereich` legt fest, in welchem Umfang ein Name " +"innerhalb eines Blocks sichtbar ist. Wird eine lokale Variable in einem " +"Block definiert, erstreckt sich ihr Gültigkeitsbereich auf diesen Block. " +"Erfolgt die Definition in einem Funktionsblock, erstreckt sich der " +"Gültigkeitsbereich auf alle Blöcke, die in dem definierenden Block enthalten" +" sind, es sei denn, ein darin enthaltener Block führt eine andere Bindung " +"für den Namen ein." msgid "" "When a name is used in a code block, it is resolved using the nearest " "enclosing scope. The set of all such scopes visible to a code block is " "called the block's :dfn:`environment`." msgstr "" +"Wenn ein Name in einem Codeblock verwendet wird, wird er anhand des " +"nächstgelegenen übergeordneten Gültigkeitsbereichs aufgelöst. Die Menge " +"aller solcher Gültigkeitsbereiche, die für einen Codeblock sichtbar sind, " +"wird als :dfn:`Umgebung` des Blocks bezeichnet." msgid "" "When a name is not found at all, a :exc:`NameError` exception is raised. If " "the current scope is a function scope, and the name refers to a local " "variable that has not yet been bound to a value at the point where the name " -"is used, an :exc:`UnboundLocalError` exception is raised. :exc:" -"`UnboundLocalError` is a subclass of :exc:`NameError`." +"is used, an :exc:`UnboundLocalError` exception is raised. " +":exc:`UnboundLocalError` is a subclass of :exc:`NameError`." msgstr "" +"Wenn ein Name überhaupt nicht gefunden wird, wird eine Ausnahme vom Typ " +":exc:`NameError` ausgelöst. Handelt es sich beim aktuellen " +"Gültigkeitsbereich um einen Funktionsbereich und bezieht sich der Name auf " +"eine lokale Variable, die an der Stelle, an der der Name verwendet wird, " +"noch nicht mit einem Wert belegt wurde, wird eine Ausnahme vom Typ " +":exc:`UnboundLocalError` ausgelöst. :exc:`UnboundLocalError` ist eine " +"Unterklasse von :exc:`NameError` ." msgid "" -"If a name binding operation occurs anywhere within a code block, all uses of " -"the name within the block are treated as references to the current block. " +"If a name binding operation occurs anywhere within a code block, all uses of" +" the name within the block are treated as references to the current block. " "This can lead to errors when a name is used within a block before it is " "bound. This rule is subtle. Python lacks declarations and allows name " "binding operations to occur anywhere within a code block. The local " @@ -162,18 +225,41 @@ msgid "" "the block for name binding operations. See :ref:`the FAQ entry on " "UnboundLocalError ` for examples." msgstr "" +"Wenn irgendwo innerhalb eines Codeblocks eine Namensbindung stattfindet, " +"werden alle Verwendungen des Namens innerhalb des Blocks als Verweise auf " +"den aktuellen Block behandelt. Dies kann zu Fehlern führen, wenn ein Name " +"innerhalb eines Blocks verwendet wird, bevor er gebunden wurde. Diese Regel " +"ist nicht ganz einfach zu verstehen. Python kennt keine Deklarationen und " +"erlaubt es, dass Namensbindungsoperationen an beliebiger Stelle innerhalb " +"eines Codeblocks stattfinden. Die lokalen Variablen eines Codeblocks lassen" +" sich ermitteln, indem der gesamte Text des Blocks auf " +"Namensbindungsoperationen durchsucht wird. Beispiele finden Sie im " +":ref:`FAQ-Eintrag zu UnboundLocalError `." msgid "" "If the :keyword:`global` statement occurs within a block, all uses of the " -"names specified in the statement refer to the bindings of those names in the " -"top-level namespace. Names are resolved in the top-level namespace by " +"names specified in the statement refer to the bindings of those names in the" +" top-level namespace. Names are resolved in the top-level namespace by " "searching the global namespace, i.e. the namespace of the module containing " -"the code block, and the builtins namespace, the namespace of the module :mod:" -"`builtins`. The global namespace is searched first. If the names are not " -"found there, the builtins namespace is searched next. If the names are also " -"not found in the builtins namespace, new variables are created in the global " -"namespace. The global statement must precede all uses of the listed names." -msgstr "" +"the code block, and the builtins namespace, the namespace of the module " +":mod:`builtins`. The global namespace is searched first. If the names are " +"not found there, the builtins namespace is searched next. If the names are " +"also not found in the builtins namespace, new variables are created in the " +"global namespace. The global statement must precede all uses of the listed " +"names." +msgstr "" +"Wenn die Anweisung :keyword:`global` innerhalb eines Blocks auftritt, " +"beziehen sich alle Verwendungen der in der Anweisung angegebenen Namen auf " +"die Zuordnungen dieser Namen im obersten Namensraum. Namen werden im " +"obersten Namensraum aufgelöst, indem der globale Namensraum, d. h. der " +"Namensraum des Moduls, das den Codeblock enthält, sowie der " +"„builtins“-Namensraum, der Namensraum des Moduls :mod:`builtins`, " +"durchsucht werden. Der globale Namensraum wird zuerst durchsucht. Werden die" +" Namen dort nicht gefunden, wird als Nächstes der „builtins“-Namensraum " +"durchsucht. Werden die Namen auch im „builtins“-Namensraum nicht gefunden, " +"werden neue Variablen im globalen Namensraum angelegt. Die Anweisung " +"„global“ muss allen Verwendungen der aufgeführten Namen vorangestellt " +"werden." msgid "" "The :keyword:`global` statement has the same scope as a name binding " @@ -181,19 +267,33 @@ msgid "" "variable contains a global statement, the free variable is treated as a " "global." msgstr "" +"Die Anweisung :keyword:`global` hat denselben Geltungsbereich wie eine " +"Namensbindung im selben Block. Wenn der nächstübergeordnete Geltungsbereich " +"einer freien Variablen eine globale Anweisung enthält, wird die freie " +"Variable als globale Variable behandelt." msgid "" "The :keyword:`nonlocal` statement causes corresponding names to refer to " -"previously bound variables in the nearest enclosing function scope. :exc:" -"`SyntaxError` is raised at compile time if the given name does not exist in " -"any enclosing function scope. :ref:`Type parameters ` cannot be " -"rebound with the :keyword:`!nonlocal` statement." +"previously bound variables in the nearest enclosing function scope. " +":exc:`SyntaxError` is raised at compile time if the given name does not " +"exist in any enclosing function scope. :ref:`Type parameters ` " +"cannot be rebound with the :keyword:`!nonlocal` statement." msgstr "" +"Die Anweisung :keyword:`nonlocal` bewirkt, dass die entsprechenden Namen" +" auf zuvor gebundene Variablen im nächstübergeordneten " +"Funktionsgültigkeitsbereich verweisen. Wenn der angegebene Name in keinem " +"übergeordneten Funktionsgültigkeitsbereich existiert, wird zur " +"Kompilierungszeit ein :exc:`SyntaxError` ausgelöst. :ref:`Typ-Parameter " +"` können mit der Anweisung :keyword:`!nonlocal` nicht neu " +"gebunden werden." msgid "" "The namespace for a module is automatically created the first time a module " "is imported. The main module for a script is always called :mod:`__main__`." msgstr "" +"Der Namensraum für ein Modul wird automatisch angelegt, sobald das Modul zum" +" ersten Mal importiert wird. Das Hauptmodul eines Skripts heißt immer " +":mod:`__main__` ." msgid "" "Class definition blocks and arguments to :func:`exec` and :func:`eval` are " @@ -201,22 +301,38 @@ msgid "" "executable statement that may use and define names. These references follow " "the normal rules for name resolution with an exception that unbound local " "variables are looked up in the global namespace. The namespace of the class " -"definition becomes the attribute dictionary of the class. The scope of names " -"defined in a class block is limited to the class block; it does not extend " +"definition becomes the attribute dictionary of the class. The scope of names" +" defined in a class block is limited to the class block; it does not extend " "to the code blocks of methods. This includes comprehensions and generator " "expressions, but it does not include :ref:`annotation scopes `, which have access to their enclosing class scopes. This means that " -"the following will fail::" -msgstr "" +"scopes>`, which have access to their enclosing class scopes. This means that" +" the following will fail::" +msgstr "" +"Klassendefinitionsblöcke und Argumente für :func:`exec` und " +":func:`eval` stellen im Zusammenhang mit der Namensauflösung einen " +"Sonderfall dar. Eine Klassendefinition ist eine ausführbare Anweisung, die " +"Namen verwenden und definieren kann. Diese Verweise folgen den üblichen " +"Regeln für die Namensauflösung, mit der Ausnahme, dass ungebundene lokale " +"Variablen im globalen Namensraum gesucht werden. Der Namensraum der " +"Klassendefinition wird zum Attributwörterbuch der Klasse. Der " +"Geltungsbereich von Namen, die in einem Klassenblock definiert werden, ist " +"auf den Klassenblock beschränkt; er erstreckt sich nicht auf die Codeblöcke " +"von Methoden. Dies umfasst Comprehensions und Generatorausdrücke, jedoch " +"nicht :ref:`Annotations-Geltungsbereiche `, die Zugriff " +"auf die Geltungsbereiche ihrer umschließenden Klassen haben. Das bedeutet, " +"dass Folgendes fehlschlagen wird::" msgid "" "class A:\n" " a = 42\n" " b = list(a + i for i in range(10))" msgstr "" +"Klasse A:\n" +" a = 42\n" +" b = list(a + i for i in range(10))" msgid "However, the following will succeed::" -msgstr "" +msgstr "Folgendes wird jedoch funktionieren:" msgid "" "class A:\n" @@ -225,51 +341,74 @@ msgid "" "\n" "print(A.Alias.__value__) # " msgstr "" +"Klasse A:\n" +" Typ Alias = Nested\n" +" Klasse Nested: pass\n" +"\n" +"print(A.Alias.__value__) # " msgid "Annotation scopes" -msgstr "" +msgstr "Gültigkeitsbereiche von Annotationen" msgid "" ":term:`Annotations `, :ref:`type parameter lists ` " "and :keyword:`type` statements introduce *annotation scopes*, which behave " "mostly like function scopes, but with some exceptions discussed below." msgstr "" +":term:`Annotationen `, :ref:`Typ-Parameterlisten ` " +"und :keyword:`type` -Anweisungen führen *Annotationsgültigkeitsbereiche* " +"ein, die sich größtenteils wie Funktionsgültigkeitsbereiche verhalten, " +"jedoch mit einigen Ausnahmen, die im Folgenden erläutert werden." msgid "Annotation scopes are used in the following contexts:" -msgstr "" +msgstr "Annotationsbereiche werden in den folgenden Kontexten verwendet:" msgid ":term:`Function annotations `." -msgstr "" +msgstr ":term:`Funktionsannotationen `." msgid ":term:`Variable annotations `." -msgstr "" +msgstr ":term:`Variablen-Annotationen `." msgid "" "Type parameter lists for :ref:`generic type aliases `." msgstr "" +"Typ-Parameterlisten für :ref:`generische Typ-Aliase `." msgid "" "Type parameter lists for :ref:`generic functions `. A " -"generic function's annotations are executed within the annotation scope, but " -"its defaults and decorators are not." +"generic function's annotations are executed within the annotation scope, but" +" its defaults and decorators are not." msgstr "" +"Typ-Parameterlisten für :ref:`generische Funktionen `. " +"Die Annotationen einer generischen Funktion werden innerhalb des " +"Annotationsbereichs ausgeführt, ihre Standardwerte und Dekoratoren hingegen " +"nicht." msgid "" -"Type parameter lists for :ref:`generic classes `. A generic " -"class's base classes and keyword arguments are executed within the " +"Type parameter lists for :ref:`generic classes `. A generic" +" class's base classes and keyword arguments are executed within the " "annotation scope, but its decorators are not." msgstr "" +"Typ-Parameterlisten für :ref:`generische Klassen `. Die " +"Basisklassen und Schlüsselwortargumente einer generischen Klasse werden " +"innerhalb des Annotationsbereichs ausgeführt, ihre Dekoratoren jedoch nicht." msgid "" -"The bounds, constraints, and default values for type parameters (:ref:" -"`lazily evaluated `)." +"The bounds, constraints, and default values for type parameters " +"(:ref:`lazily evaluated `)." msgstr "" +"Die Grenzen, Einschränkungen und Standardwerte für Typparameter " +"(:ref:`verzögert ausgewertete `)." msgid "The value of type aliases (:ref:`lazily evaluated `)." msgstr "" +"Der Wert von Typaliasen (:ref:` `, die verzögert " +"ausgewertet werden)." msgid "Annotation scopes differ from function scopes in the following ways:" msgstr "" +"Annotations-Gültigkeitsbereiche unterscheiden sich in folgenden Punkten von " +"Funktions-Gültigkeitsbereichen:" msgid "" "Annotation scopes have access to their enclosing class namespace. If an " @@ -280,57 +419,96 @@ msgid "" "functions defined within classes, which cannot access names defined in the " "class scope." msgstr "" +"Annotationsbereiche haben Zugriff auf den Namensraum ihrer übergeordneten " +"Klasse. Befindet sich ein Annotationsbereich unmittelbar innerhalb eines " +"Klassenbereichs oder innerhalb eines anderen Annotationsbereichs, der sich " +"wiederum unmittelbar innerhalb eines Klassenbereichs befindet, kann der Code" +" im Annotationsbereich auf im Klassenbereich definierte Namen zugreifen, als" +" würde er direkt innerhalb des Klassenkörpers ausgeführt. Dies steht im " +"Gegensatz zu regulären, innerhalb von Klassen definierten Funktionen, die " +"keinen Zugriff auf im Klassenbereich definierte Namen haben." msgid "" "Expressions in annotation scopes cannot contain :keyword:`yield`, ``yield " -"from``, :keyword:`await`, or :token:`:= ` expressions. (These expressions are allowed in other " -"scopes contained within the annotation scope.)" +"from``, :keyword:`await`, or :token:`:= ` expressions. (These expressions are allowed " +"in other scopes contained within the annotation scope.)" msgstr "" +"Ausdrücke in Annotationsbereichen dürfen keine Ausdrücke vom Typ " +":keyword:`yield`, ``yield from``, :keyword:`await` oder " +":token:`:= ` enthalten. (Diese " +"Ausdrücke sind in anderen Bereichen zulässig, die innerhalb des " +"Annotationsbereichs enthalten sind.)" msgid "" -"Names defined in annotation scopes cannot be rebound with :keyword:" -"`nonlocal` statements in inner scopes. This includes only type parameters, " -"as no other syntactic elements that can appear within annotation scopes can " -"introduce new names." +"Names defined in annotation scopes cannot be rebound with " +":keyword:`nonlocal` statements in inner scopes. This includes only type " +"parameters, as no other syntactic elements that can appear within annotation" +" scopes can introduce new names." msgstr "" +"Namen, die in Annotationsbereichen definiert wurden, können nicht mit " +":keyword:`nonlocal` `-Anweisungen in inneren Bereichen neu definiert werden." +" Dies betrifft ausschließlich Typparameter, da keine anderen syntaktischen " +"Elemente, die innerhalb von Annotationsbereichen vorkommen können, neue " +"Namen einführen können." msgid "" -"While annotation scopes have an internal name, that name is not reflected in " -"the :term:`qualified name` of objects defined within the scope. Instead, " +"While annotation scopes have an internal name, that name is not reflected in" +" the :term:`qualified name` of objects defined within the scope. Instead, " "the :attr:`~definition.__qualname__` of such objects is as if the object " "were defined in the enclosing scope." msgstr "" +"Annotationsbereiche verfügen zwar über einen internen Namen, dieser Name " +"spiegelt sich jedoch nicht im :term:`qualifizierten Namen` der innerhalb des" +" Bereichs definierten Objekte wider. Stattdessen entspricht der " +":attr:`~definition.__qualname__` solcher Objekte dem, als wäre das Objekt " +"im übergeordneten Bereich definiert." -msgid "Annotation scopes were introduced in Python 3.12 as part of :pep:`695`." +msgid "" +"Annotation scopes were introduced in Python 3.12 as part of :pep:`695`." msgstr "" +"Annotationsbereiche wurden in Python 3.12 als Teil von :pep:`695` " +"eingeführt." msgid "" "Annotation scopes are also used for type parameter defaults, as introduced " "by :pep:`696`." msgstr "" +"Annotationsbereiche werden auch für Standardwerte von Typparametern " +"verwendet, wie unter :pep:`696` beschrieben." msgid "" -"Annotation scopes are now also used for annotations, as specified in :pep:" -"`649` and :pep:`749`." +"Annotation scopes are now also used for annotations, as specified in " +":pep:`649` and :pep:`749`." msgstr "" +"Annotationsbereiche werden nun auch für Annotationen verwendet, wie unter " +":pep:`649` und :pep:`749` beschrieben." msgid "Lazy evaluation" -msgstr "" +msgstr "Verzögerte Auswertung" msgid "" "Most annotation scopes are *lazily evaluated*. This includes annotations, " "the values of type aliases created through the :keyword:`type` statement, " "and the bounds, constraints, and default values of type variables created " -"through the :ref:`type parameter syntax `. This means that they " -"are not evaluated when the type alias or type variable is created, or when " -"the object carrying annotations is created. Instead, they are only evaluated " -"when necessary, for example when the ``__value__`` attribute on a type alias " -"is accessed." -msgstr "" +"through the :ref:`type parameter syntax `. This means that they" +" are not evaluated when the type alias or type variable is created, or when " +"the object carrying annotations is created. Instead, they are only evaluated" +" when necessary, for example when the ``__value__`` attribute on a type " +"alias is accessed." +msgstr "" +"Die meisten Annotationsbereiche werden *verzögert ausgewertet*. Dazu gehören" +" Annotationen, die Werte von Typaliasen, die über die Anweisung " +":keyword:`type` erstellt wurden, sowie die Grenzen, Einschränkungen und " +"Standardwerte von Typvariablen, die über die :ref:`Typ-Parametersyntax " +"` erstellt wurden. Das bedeutet, dass sie nicht ausgewertet " +"werden, wenn der Typalias oder die Typvariable erstellt wird oder wenn das " +"Objekt, das die Annotationen trägt, erstellt wird. Stattdessen werden sie " +"erst bei Bedarf ausgewertet, beispielsweise wenn auf das Attribut " +"``__value__`` eines Typalias zugegriffen wird." msgid "Example:" -msgstr "" +msgstr "Beispiel:" msgid "" ">>> type Alias = 1/0\n" @@ -345,17 +523,35 @@ msgid "" " ...\n" "ZeroDivisionError: division by zero" msgstr "" +">>> type Alias = 1/0\n" +">>> Alias.__value__\n" +"Traceback (most recent call last):\n" +" ...\n" +"ZeroDivisionError: division by zero\n" +">>> def func[T: 1/0](): pass\n" +">>> T = func.__type_params__[0]\n" +">>> T.__bound__\n" +"Traceback (most recent call last):\n" +" ...\n" +"ZeroDivisionError: division by zero" msgid "" "Here the exception is raised only when the ``__value__`` attribute of the " "type alias or the ``__bound__`` attribute of the type variable is accessed." msgstr "" +"Hier wird die Ausnahme nur ausgelöst, wenn auf das Attribut ``__value__`` " +" des Typalias oder auf das Attribut ``__bound__`` der Typvariablen " +"zugegriffen wird." msgid "" "This behavior is primarily useful for references to types that have not yet " "been defined when the type alias or type variable is created. For example, " "lazy evaluation enables creation of mutually recursive type aliases::" msgstr "" +"Dieses Verhalten ist vor allem bei Verweisen auf Typen nützlich, die zum " +"Zeitpunkt der Erstellung des Typalias oder der Typvariablen noch nicht " +"definiert waren. So ermöglicht die verzögerte Auswertung beispielsweise die " +"Erstellung von gegenseitig rekursiven Typalias:" msgid "" "from typing import Literal\n" @@ -370,34 +566,53 @@ msgid "" "scopes>`, which means that names that appear inside the lazily evaluated " "value are looked up as if they were used in the immediately enclosing scope." msgstr "" +"Verzögerte ausgewertete Werte werden im :ref:`Annotationsbereich ` ausgewertet, was bedeutet, dass Namen, die innerhalb des verzögert" +"ausgewerteten Werts vorkommen, so nachgeschlagen werden, als würden sie im " +"unmittelbar umgebenden Bereich verwendet." msgid "Builtins and restricted execution" -msgstr "" +msgstr "Eingebaute Funktionen und eingeschränkte Ausführung" msgid "" "Users should not touch ``__builtins__``; it is strictly an implementation " -"detail. Users wanting to override values in the builtins namespace should :" -"keyword:`import` the :mod:`builtins` module and modify its attributes " +"detail. Users wanting to override values in the builtins namespace should " +":keyword:`import` the :mod:`builtins` module and modify its attributes " "appropriately." msgstr "" +"Benutzer sollten ``__builtins__`` nicht ändern; es handelt sich dabei " +"ausschließlich um ein Implementierungsdetail. Benutzer, die Werte im " +"Namespace „builtins“ überschreiben möchten, sollten das Modul " +":mod:`builtins` über :keyword:`import` laden und dessen Attribute " +"entsprechend anpassen." msgid "" "The builtins namespace associated with the execution of a code block is " "actually found by looking up the name ``__builtins__`` in its global " "namespace; this should be a dictionary or a module (in the latter case the " "module's dictionary is used). By default, when in the :mod:`__main__` " -"module, ``__builtins__`` is the built-in module :mod:`builtins`; when in any " -"other module, ``__builtins__`` is an alias for the dictionary of the :mod:" -"`builtins` module itself." -msgstr "" +"module, ``__builtins__`` is the built-in module :mod:`builtins`; when in any" +" other module, ``__builtins__`` is an alias for the dictionary of the " +":mod:`builtins` module itself." +msgstr "" +"Der mit der Ausführung eines Codeblocks verbundene \"builtins\“-Namensraum " +"wird tatsächlich durch Abfrage des Namens ``__builtins__`` in dessen " +"globalem Namensraum ermittelt; dabei sollte es sich um ein Wörterbuch oder " +"ein Modul handeln (im letzteren Fall wird das Wörterbuch des Moduls " +"verwendet). Standardmäßig ist ``__builtins__`` im Modul " +":mod:`__main__` das eingebaute Modul :mod:`builtins` ; in jedem anderen" +" Modul ist ``__builtins__`` ein Alias für das Wörterbuch des Moduls " +":mod:`builtins` selbst." msgid "Interaction with dynamic features" -msgstr "" +msgstr "Interaktion mit dynamischen Funktionen" msgid "" "Name resolution of free variables occurs at runtime, not at compile time. " "This means that the following code will print 42::" msgstr "" +"Die Auflösung freier Variablen erfolgt zur Laufzeit und nicht zur " +"Kompilierungszeit. Das bedeutet, dass der folgende Code 42 ausgibt::" msgid "" "i = 10\n" @@ -406,16 +621,29 @@ msgid "" "i = 42\n" "f()" msgstr "" +"i = 10\n" +"def f():\n" +" print(i)\n" +"i = 42\n" +"f()" msgid "" "The :func:`eval` and :func:`exec` functions do not have access to the full " "environment for resolving names. Names may be resolved in the local and " "global namespaces of the caller. Free variables are not resolved in the " -"nearest enclosing namespace, but in the global namespace. [#]_ The :func:" -"`exec` and :func:`eval` functions have optional arguments to override the " -"global and local namespace. If only one namespace is specified, it is used " -"for both." -msgstr "" +"nearest enclosing namespace, but in the global namespace. [#]_ The " +":func:`exec` and :func:`eval` functions have optional arguments to override " +"the global and local namespace. If only one namespace is specified, it is " +"used for both." +msgstr "" +"Die Funktionen :func:`eval` und :func:`exec` haben keinen Zugriff " +"auf die vollständige Umgebung zur Namensauflösung. Namen können im lokalen " +"und globalen Namensraum des Aufrufers aufgelöst werden. Freie Variablen " +"werden nicht im nächstübergeordneten Namensraum, sondern im globalen " +"Namensraum aufgelöst. [#]_ Die Funktionen :func:`exec` und " +":func:`eval` verfügen über optionale Argumente, um den globalen und " +"lokalen Namensraum zu überschreiben. Wird nur ein Namensraum angegeben, wird" +" dieser für beide verwendet." msgid "Exceptions" msgstr "Ausnahmen" @@ -427,30 +655,55 @@ msgid "" "*handled* by the surrounding code block or by any code block that directly " "or indirectly invoked the code block where the error occurred." msgstr "" +"Ausnahmen dienen dazu, den normalen Kontrollfluss eines Codeblocks zu " +"unterbrechen, um Fehler oder andere Ausnahmebedingungen zu behandeln. Eine " +"Ausnahme wird an der Stelle *ausgelöst*, an der der Fehler erkannt wird; sie" +" kann vom umgebenden Codeblock oder von jedem Codeblock *behandelt* werden, " +"der den Codeblock, in dem der Fehler aufgetreten ist, direkt oder indirekt " +"aufgerufen hat." msgid "" "The Python interpreter raises an exception when it detects a run-time error " "(such as division by zero). A Python program can also explicitly raise an " "exception with the :keyword:`raise` statement. Exception handlers are " -"specified with the :keyword:`try` ... :keyword:`except` statement. The :" -"keyword:`finally` clause of such a statement can be used to specify cleanup " -"code which does not handle the exception, but is executed whether an " +"specified with the :keyword:`try` ... :keyword:`except` statement. The " +":keyword:`finally` clause of such a statement can be used to specify cleanup" +" code which does not handle the exception, but is executed whether an " "exception occurred or not in the preceding code." msgstr "" +"Der Python-Interpreter löst eine Ausnahme aus, wenn er einen Laufzeitfehler " +"(wie beispielsweise eine Division durch Null) feststellt. Ein Python-" +"Programm kann zudem mit der Anweisung :keyword:`raise` explizit eine " +"Ausnahme auslösen. Ausnahmebehandler werden mit der Anweisung " +":keyword:`try`... :keyword:`except` festgelegt. Die Klausel " +":keyword:`finally` einer solchen Anweisung kann verwendet werden, um " +"Aufräumcode anzugeben, der die Ausnahme nicht behandelt, sondern unabhängig " +"davon ausgeführt wird, ob im vorangehenden Code eine Ausnahme aufgetreten " +"ist oder nicht." msgid "" "Python uses the \"termination\" model of error handling: an exception " -"handler can find out what happened and continue execution at an outer level, " -"but it cannot repair the cause of the error and retry the failing operation " -"(except by re-entering the offending piece of code from the top)." +"handler can find out what happened and continue execution at an outer level," +" but it cannot repair the cause of the error and retry the failing operation" +" (except by re-entering the offending piece of code from the top)." msgstr "" +"Python verwendet das \"Termination\“-Modell der Fehlerbehandlung: Ein " +"Ausnahmebehandler kann zwar feststellen, was passiert ist, und die " +"Ausführung auf einer übergeordneten Ebene fortsetzen, aber er kann die " +"Fehlerursache nicht beheben und den fehlgeschlagenen Vorgang nicht " +"wiederholen (außer durch erneutes Ausführen des fehlerhaften Codeabschnitts " +"von Anfang an)." msgid "" "When an exception is not handled at all, the interpreter terminates " "execution of the program, or returns to its interactive main loop. In " -"either case, it prints a stack traceback, except when the exception is :exc:" -"`SystemExit`." +"either case, it prints a stack traceback, except when the exception is " +":exc:`SystemExit`." msgstr "" +"Wird eine Ausnahme überhaupt nicht abgefangen, bricht der Interpreter die " +"Ausführung des Programms ab oder kehrt zu seiner interaktiven Hauptschleife " +"zurück. In beiden Fällen gibt er einen Stack-Traceback aus, es sei denn, es " +"handelt sich um die Ausnahme :exc:`SystemExit` ." msgid "" "Exceptions are identified by class instances. The :keyword:`except` clause " @@ -459,40 +712,57 @@ msgid "" "class>` thereof. The instance can be received by the handler and can carry " "additional information about the exceptional condition." msgstr "" +"Ausnahmen werden anhand von Klasseninstanzen identifiziert. Die Klausel " +":keyword:`except` wird je nach Klasse der Instanz ausgewählt: Sie muss auf" +" die Klasse der Instanz oder auf eine :term:`nicht-virtuelle Basisklasse " +"` derselben verweisen. Die Instanz kann vom Handler " +"empfangen werden und zusätzliche Informationen über die Ausnahmebedingung " +"enthalten." msgid "" "Exception messages are not part of the Python API. Their contents may " -"change from one version of Python to the next without warning and should not " -"be relied on by code which will run under multiple versions of the " +"change from one version of Python to the next without warning and should not" +" be relied on by code which will run under multiple versions of the " "interpreter." msgstr "" +"Ausnahmemeldungen sind nicht Teil der Python-API. Ihr Inhalt kann sich von " +"einer Python-Version zur nächsten ohne Vorwarnung ändern, weshalb sich Code," +" der unter mehreren Versionen des Interpreters ausgeführt wird, nicht darauf" +" verlassen sollte." msgid "" -"See also the description of the :keyword:`try` statement in section :ref:" -"`try` and :keyword:`raise` statement in section :ref:`raise`." +"See also the description of the :keyword:`try` statement in section " +":ref:`try` and :keyword:`raise` statement in section :ref:`raise`." msgstr "" +"Siehe auch die Beschreibung der Anweisung :keyword:`try` im Abschnitt " +":ref:`try` und der Anweisung :keyword:`raise` im Abschnitt :ref:`raise`." msgid "Runtime Components" -msgstr "" +msgstr "Laufzeitkomponenten" msgid "General Computing Model" -msgstr "" +msgstr "Allgemeines Rechenmodell" msgid "" "Python's execution model does not operate in a vacuum. It runs on a host " -"machine and through that host's runtime environment, including its operating " -"system (OS), if there is one. When a program runs, the conceptual layers of " -"how it runs on the host look something like this:" +"machine and through that host's runtime environment, including its operating" +" system (OS), if there is one. When a program runs, the conceptual layers " +"of how it runs on the host look something like this:" msgstr "" +"Das Ausführungsmodell von Python funktioniert nicht in einem Vakuum. Es " +"läuft auf einem Host-Rechner und nutzt dessen Laufzeitumgebung, " +"einschließlich des Betriebssystems (OS), sofern vorhanden. Wenn ein Programm" +" ausgeführt wird, sehen die konzeptionellen Ebenen seiner Ausführung auf dem" +" Host in etwa wie folgt aus:" msgid "**host machine**" -msgstr "" +msgstr "**Host-Rechner**" msgid "**process** (global resources)" -msgstr "" +msgstr "**Prozess** (globale Ressourcen)" msgid "**thread** (runs machine code)" -msgstr "" +msgstr "**Thread** (führt Maschinencode aus)" msgid "" "Each process represents a program running on the host. Think of each " @@ -500,34 +770,58 @@ msgid "" "threads as the execution part of the program. This distinction will be " "important to understand the conceptual Python runtime." msgstr "" +"Jeder Prozess entspricht einem Programm, das auf dem Host läuft. Stellen Sie" +" sich jeden Prozess selbst als den Datenteil seines Programms vor. Stellen " +"Sie sich die Threads des Prozesses als den Ausführungsteil des Programms " +"vor. Diese Unterscheidung ist wichtig, um die konzeptionelle Python-" +"Laufzeitumgebung zu verstehen." msgid "" -"The process, as the data part, is the execution context in which the program " -"runs. It mostly consists of the set of resources assigned to the program by " -"the host, including memory, signals, file handles, sockets, and environment " -"variables." +"The process, as the data part, is the execution context in which the program" +" runs. It mostly consists of the set of resources assigned to the program " +"by the host, including memory, signals, file handles, sockets, and " +"environment variables." msgstr "" +"Der Prozess ist, ebenso wie der Datenteil, der Ausführungskontext, in dem " +"das Programm läuft. Er besteht im Wesentlichen aus der Gesamtheit der " +"Ressourcen, die dem Programm vom Host zugewiesen wurden, darunter Speicher, " +"Signale, Dateihandles, Sockets und Umgebungsvariablen." msgid "" "Processes are isolated and independent from one another. (The same is true " -"for hosts.) The host manages the process' access to its assigned resources, " -"in addition to coordinating between processes." +"for hosts.) The host manages the process' access to its assigned resources," +" in addition to coordinating between processes." msgstr "" +"Prozesse sind voneinander isoliert und unabhängig. (Das Gleiche gilt für " +"Hosts.) Der Host verwaltet den Zugriff des Prozesses auf die ihm " +"zugewiesenen Ressourcen und sorgt zudem für die Koordination zwischen den " +"Prozessen." msgid "" "Each thread represents the actual execution of the program's machine code, " "running relative to the resources assigned to the program's process. It's " "strictly up to the host how and when that execution takes place." msgstr "" +"Jeder Thread steht für die tatsächliche Ausführung des Maschinencodes des " +"Programms, die relativ zu den Ressourcen erfolgt, die dem Prozess des " +"Programms zugewiesen sind. Es liegt ausschließlich im Ermessen des Hosts, " +"wie und wann diese Ausführung stattfindet." msgid "" "From the point of view of Python, a program always starts with exactly one " "thread. However, the program may grow to run in multiple simultaneous " "threads. Not all hosts support multiple threads per process, but most do. " -"Unlike processes, threads in a process are not isolated and independent from " -"one another. Specifically, all threads in a process share all of the " +"Unlike processes, threads in a process are not isolated and independent from" +" one another. Specifically, all threads in a process share all of the " "process' resources." msgstr "" +"Aus Sicht von Python beginnt ein Programm immer mit genau einem Thread. Das " +"Programm kann jedoch so wachsen, dass es in mehreren gleichzeitigen Threads " +"ausgeführt wird. Nicht alle Hosts unterstützen mehrere Threads pro Prozess, " +"die meisten jedoch schon. Im Gegensatz zu Prozessen sind Threads innerhalb " +"eines Prozesses nicht voneinander isoliert und unabhängig. Konkret bedeutet" +" dies, dass sich alle Threads eines Prozesses die gesamten Ressourcen des " +"Prozesses teilen." msgid "" "The fundamental point of threads is that each one does *run* independently, " @@ -535,17 +829,31 @@ msgid "" "time (\"concurrently\") or physically (\"in parallel\"). Either way, the " "threads effectively run at a non-synchronized rate." msgstr "" +"Das Wesentliche an Threads ist, dass jeder einzelne unabhängig von den " +"anderen *läuft*, und zwar gleichzeitig mit ihnen. Das kann entweder nur " +"konzeptionell gleichzeitig („konkurrent“) oder physisch („parallel“) der " +"Fall sein. So oder so laufen die Threads effektiv mit einer nicht " +"synchronisierten Geschwindigkeit." msgid "" "That non-synchronized rate means none of the process' memory is guaranteed " "to stay consistent for the code running in any given thread. Thus multi-" "threaded programs must take care to coordinate access to intentionally " "shared resources. Likewise, they must take care to be absolutely diligent " -"about not accessing any *other* resources in multiple threads; otherwise two " -"threads running at the same time might accidentally interfere with each " +"about not accessing any *other* resources in multiple threads; otherwise two" +" threads running at the same time might accidentally interfere with each " "other's use of some shared data. All this is true for both Python programs " "and the Python runtime." msgstr "" +"Diese nicht synchronisierte Rate bedeutet, dass für den in einem bestimmten " +"Thread ausgeführten Code nicht garantiert werden kann, dass der Speicher des" +" Prozesses konsistent bleibt. Daher müssen Multithread-Programme darauf " +"achten, den Zugriff auf bewusst gemeinsam genutzte Ressourcen zu " +"koordinieren. Ebenso müssen sie unbedingt darauf achten, in mehreren " +"Threads nicht auf *andere* Ressourcen zuzugreifen; andernfalls könnten sich " +"zwei gleichzeitig laufende Threads versehentlich bei der Nutzung gemeinsamer" +" Daten gegenseitig stören. All dies gilt sowohl für Python-Programme als " +"auch für die Python-Laufzeitumgebung." msgid "" "The cost of this broad, unstructured requirement is the tradeoff for the " @@ -553,46 +861,66 @@ msgid "" "required discipline generally means dealing with non-deterministic bugs and " "data corruption." msgstr "" +"Der Preis für diese weit gefasste, unstrukturierte Anforderung ist der " +"Kompromiss, den man für die Art von roher Parallelität eingehen muss, die " +"Threads bieten. Die Alternative zu der erforderlichen Disziplin bedeutet in " +"der Regel, sich mit nichtdeterministischen Fehlern und Datenbeschädigungen " +"auseinandersetzen zu müssen." msgid "Python Runtime Model" -msgstr "" +msgstr "Python-Laufzeitmodell" msgid "" "The same conceptual layers apply to each Python program, with some extra " "data layers specific to Python:" msgstr "" +"Für jedes Python-Programm gelten dieselben konzeptionellen Ebenen, ergänzt " +"durch einige zusätzliche, für Python spezifische Datenschichten:" msgid "Python global runtime (*state*)" -msgstr "" +msgstr "Globale Laufzeitumgebung von Python (*state*)" msgid "Python interpreter (*state*)" -msgstr "" +msgstr "Python-Interpreter (*Zustand*)" msgid "**thread** (runs Python bytecode and \"C-API\")" -msgstr "" +msgstr "**Thread** (führt Python-Bytecode und \"C-API\“ aus)" msgid "Python thread *state*" -msgstr "" +msgstr "Python-Thread-*Zustand*" msgid "" -"At the conceptual level: when a Python program starts, it looks exactly like " -"that diagram, with one of each. The runtime may grow to include multiple " +"At the conceptual level: when a Python program starts, it looks exactly like" +" that diagram, with one of each. The runtime may grow to include multiple " "interpreters, and each interpreter may grow to include multiple thread " "states." msgstr "" +"Auf konzeptioneller Ebene: Wenn ein Python-Programm startet, sieht es genau " +"wie in diesem Diagramm aus, wobei jeweils nur ein Element vorhanden ist. Die" +" Laufzeitumgebung kann sich so weit ausdehnen, dass sie mehrere Interpreter " +"umfasst, und jeder Interpreter kann sich so weit ausdehnen, dass er mehrere " +"Thread-Zustände umfasst." msgid "" "A Python implementation won't necessarily implement the runtime layers " "distinctly or even concretely. The only exception is places where distinct " -"layers are directly specified or exposed to users, like through the :mod:" -"`threading` module." +"layers are directly specified or exposed to users, like through the " +":mod:`threading` module." msgstr "" +"Eine Python-Implementierung muss die Laufzeitschichten nicht unbedingt klar " +"voneinander abgegrenzt oder gar konkret implementieren. Die einzige Ausnahme" +" bilden Stellen, an denen bestimmte Schichten direkt festgelegt oder den " +"Benutzern zugänglich gemacht werden, beispielsweise über das Modul " +":mod:`threading` ." msgid "" "The initial interpreter is typically called the \"main\" interpreter. Some " "Python implementations, like CPython, assign special roles to the main " "interpreter." msgstr "" +"Der ursprüngliche Interpreter wird in der Regel als \"Haupt\“-Interpreter " +"bezeichnet. Einige Python-Implementierungen, wie beispielsweise CPython, " +"weisen dem Hauptinterpreter besondere Rollen zu." msgid "" "Likewise, the host thread where the runtime was initialized is known as the " @@ -602,6 +930,13 @@ msgid "" "assign specific responsibilities to the main thread, such as handling " "signals." msgstr "" +"Ebenso wird der Host-Thread, in dem die Laufzeitumgebung initialisiert " +"wurde, als \"Hauptthread\“ bezeichnet. Er kann sich vom Start-Thread des " +"Prozesses unterscheiden, obwohl beide oft identisch sind. In manchen Fällen " +"kann der Begriff „Hauptthread“ sogar noch spezifischer sein und sich auf den" +" Zustand des Start-Threads beziehen. Eine Python-Laufzeitumgebung kann dem " +"Hauptthread bestimmte Aufgaben zuweisen, wie beispielsweise die Verarbeitung" +" von Signalen." msgid "" "As a whole, the Python runtime consists of the global runtime state, " @@ -609,35 +944,60 @@ msgid "" "consistent over its lifetime, particularly when used with multiple host " "threads." msgstr "" +"Insgesamt besteht die Python-Laufzeitumgebung aus dem globalen " +"Laufzeitzustand, den Interpretern und den Thread-Zuständen. Die " +"Laufzeitumgebung stellt sicher, dass all diese Zustände während ihrer " +"gesamten Lebensdauer konsistent bleiben, insbesondere bei der Verwendung mit" +" mehreren Host-Threads." msgid "" -"The global runtime, at the conceptual level, is just a set of interpreters. " -"While those interpreters are otherwise isolated and independent from one " +"The global runtime, at the conceptual level, is just a set of interpreters." +" While those interpreters are otherwise isolated and independent from one " "another, they may share some data or other resources. The runtime is " "responsible for managing these global resources safely. The actual nature " "and management of these resources is implementation-specific. Ultimately, " "the external utility of the global runtime is limited to managing " "interpreters." msgstr "" +"Die globale Laufzeitumgebung ist auf konzeptioneller Ebene lediglich eine " +"Sammlung von Interpretern. Obwohl diese Interpreter ansonsten voneinander " +"isoliert und unabhängig sind, können sie bestimmte Daten oder andere " +"Ressourcen gemeinsam nutzen. Die Laufzeitumgebung ist dafür verantwortlich, " +"diese globalen Ressourcen sicher zu verwalten. Die konkrete Ausgestaltung " +"und Verwaltung dieser Ressourcen ist implementierungsspezifisch. " +"Letztendlich beschränkt sich der externe Nutzen der globalen " +"Laufzeitumgebung auf die Verwaltung von Interpretern." msgid "" -"In contrast, an \"interpreter\" is conceptually what we would normally think " -"of as the (full-featured) \"Python runtime\". When machine code executing " +"In contrast, an \"interpreter\" is conceptually what we would normally think" +" of as the (full-featured) \"Python runtime\". When machine code executing " "in a host thread interacts with the Python runtime, it calls into Python in " "the context of a specific interpreter." msgstr "" +"Im Gegensatz dazu entspricht ein \"Interpreter\“ konzeptionell dem, was wir " +"normalerweise unter der (voll funktionsfähigen) \"Python-Laufzeitumgebung\“ " +"verstehen. Wenn Maschinencode, der in einem Host-Thread ausgeführt wird, mit" +" der Python-Laufzeitumgebung interagiert, ruft er Python im Kontext eines " +"bestimmten Interpreters auf." msgid "" "The term \"interpreter\" here is not the same as the \"bytecode " "interpreter\", which is what regularly runs in threads, executing compiled " "Python code." msgstr "" +"Der Begriff \"Interpreter\“ ist hier nicht mit dem \"Bytecode-Interpreter\“ " +"gleichzusetzen, der üblicherweise in Threads läuft und kompilierten Python-" +"Code ausführt." msgid "" "In an ideal world, \"Python runtime\" would refer to what we currently call " "\"interpreter\". However, it's been called \"interpreter\" at least since " "introduced in 1997 (`CPython:a027efa5b`_)." msgstr "" +"In einer idealen Welt würde sich der Begriff \"Python-Laufzeitumgebung\“ auf " +"das beziehen, was wir derzeit als \"Interpreter\“ bezeichnen. Allerdings wird " +"er bereits seit seiner Einführung im Jahr 1997 als \"Interpreter\“ bezeichnet " +"(`CPython:a027efa5b`_)." msgid "" "Each interpreter completely encapsulates all of the non-process-global, non-" @@ -646,12 +1006,23 @@ msgid "" "like :data:`sys.modules`. The runtime ensures multiple threads using the " "same interpreter will safely share it between them." msgstr "" +"Jeder Interpreter kapselt den gesamten nicht prozessglobalen und nicht " +"threadspezifischen Zustand vollständig ein, der für den Betrieb der Python-" +"Laufzeitumgebung erforderlich ist. Insbesondere bleibt der Zustand des " +"Interpreters zwischen den einzelnen Verwendungen erhalten. Er umfasst " +"grundlegende Daten wie :data:`sys.modules`. Die Laufzeitumgebung stellt " +"sicher, dass mehrere Threads, die denselben Interpreter verwenden, diesen " +"sicher untereinander gemeinsam nutzen können." msgid "" "A Python implementation may support using multiple interpreters at the same " "time in the same process. They are independent and isolated from one " "another. For example, each interpreter has its own :data:`sys.modules`." msgstr "" +"Eine Python-Implementierung kann die gleichzeitige Nutzung mehrerer " +"Interpreter innerhalb desselben Prozesses unterstützen. Diese sind " +"voneinander unabhängig und isoliert. So verfügt beispielsweise jeder " +"Interpreter über eine eigene Instanz von :data:`sys.modules``." msgid "" "For thread-specific runtime state, each interpreter has a set of thread " @@ -660,133 +1031,170 @@ msgid "" "needs. It may even have multiple thread states for the same host thread, " "though that isn't as common." msgstr "" +"Für den threadspezifischen Laufzeitstatus verfügt jeder Interpreter über " +"eine Reihe von Thread-Zuständen, die er verwaltet – genauso wie die globale " +"Laufzeitumgebung eine Reihe von Interpretern enthält. Er kann Thread-" +"Zustände für so viele Host-Threads haben, wie er benötigt. Es kann sogar " +"vorkommen, dass er mehrere Thread-Zustände für denselben Host-Thread hat, " +"auch wenn dies nicht allzu häufig vorkommt." msgid "" -"Each thread state, conceptually, has all the thread-specific runtime data an " -"interpreter needs to operate in one host thread. The thread state includes " -"the current raised exception and the thread's Python call stack. It may " +"Each thread state, conceptually, has all the thread-specific runtime data an" +" interpreter needs to operate in one host thread. The thread state includes" +" the current raised exception and the thread's Python call stack. It may " "include other thread-specific resources." msgstr "" +"Konzeptionell enthält jeder Thread-Zustand alle threadspezifischen " +"Laufzeitdaten, die ein Interpreter benötigt, um in einem Host-Thread zu " +"arbeiten. Der Thread-Zustand umfasst die aktuell ausgelöste Ausnahme und den" +" Python-Aufrufstapel des Threads. Er kann auch weitere threadspezifische " +"Ressourcen enthalten." msgid "" "The term \"Python thread\" can sometimes refer to a thread state, but " "normally it means a thread created using the :mod:`threading` module." msgstr "" +"Der Begriff \"Python-Thread\“ kann sich manchmal auf einen Thread-Zustand " +"beziehen, bezeichnet jedoch in der Regel einen Thread, der mithilfe des " +"Moduls :mod:`threading` erstellt wurde." msgid "" "Each thread state, over its lifetime, is always tied to exactly one " "interpreter and exactly one host thread. It will only ever be used in that " "thread and with that interpreter." msgstr "" +"Jeder Thread-Zustand ist während seiner gesamten Lebensdauer stets an genau " +"einen Interpreter und genau einen Host-Thread gebunden. Er wird " +"ausschließlich in diesem Thread und mit diesem Interpreter verwendet." msgid "" "Multiple thread states may be tied to the same host thread, whether for " -"different interpreters or even the same interpreter. However, for any given " -"host thread, only one of the thread states tied to it can be used by the " +"different interpreters or even the same interpreter. However, for any given" +" host thread, only one of the thread states tied to it can be used by the " "thread at a time." msgstr "" +"Einem Host-Thread können mehrere Thread-Zustände zugeordnet sein, sei es für" +" verschiedene Interpreter oder sogar für denselben Interpreter. Für einen " +"bestimmten Host-Thread kann jedoch jeweils nur einer der ihm zugeordneten " +"Thread-Zustände von diesem Thread verwendet werden." msgid "" "Thread states are isolated and independent from one another and don't share " "any data, except for possibly sharing an interpreter and objects or other " "resources belonging to that interpreter." msgstr "" +"Die Zustände der Threads sind voneinander isoliert und unabhängig und " +"tauschen keine Daten aus, abgesehen von der möglichen gemeinsamen Nutzung " +"eines Interpreters sowie von Objekten oder anderen Ressourcen, die zu diesem" +" Interpreter gehören." msgid "" -"Once a program is running, new Python threads can be created using the :mod:" -"`threading` module (on platforms and Python implementations that support " -"threads). Additional processes can be created using the :mod:`os`, :mod:" -"`subprocess`, and :mod:`multiprocessing` modules. Interpreters can be " +"Once a program is running, new Python threads can be created using the " +":mod:`threading` module (on platforms and Python implementations that " +"support threads). Additional processes can be created using the :mod:`os`, " +":mod:`subprocess`, and :mod:`multiprocessing` modules. Interpreters can be " "created and used with the :mod:`~concurrent.interpreters` module. " "Coroutines (async) can be run using :mod:`asyncio` in each interpreter, " "typically only in a single thread (often the main thread)." msgstr "" +"Sobald ein Programm läuft, können mithilfe des Moduls :mod:`threading` " +"neue Python-Threads erstellt werden (auf Plattformen und in Python-" +"Implementierungen, die Threads unterstützen). Zusätzliche Prozesse können " +"mithilfe der Module :mod:`os``, :mod:`subprocess`` und " +":mod:`multiprocessing` erstellt werden. Interpreter können mit dem Modul `" +" :mod:`~concurrent.interpreters` erstellt und verwendet werden. Coroutinen" +" (async) können mithilfe von :mod:`asyncio` in jedem Interpreter " +"ausgeführt werden, in der Regel nur in einem einzigen Thread (häufig dem " +"Hauptthread)." msgid "Footnotes" msgstr "Fußnoten" msgid "" -"This limitation occurs because the code that is executed by these operations " -"is not available at the time the module is compiled." +"This limitation occurs because the code that is executed by these operations" +" is not available at the time the module is compiled." msgstr "" +"Diese Einschränkung ergibt sich daraus, dass der Code, der durch diese " +"Operationen ausgeführt wird, zum Zeitpunkt der Kompilierung des Moduls noch " +"nicht verfügbar ist." msgid "execution model" -msgstr "" +msgstr "execution model" msgid "code" -msgstr "" +msgstr "code" msgid "block" -msgstr "" +msgstr "block" msgid "execution" -msgstr "" +msgstr "execution" msgid "frame" -msgstr "" +msgstr "frame" msgid "namespace" -msgstr "" +msgstr "namespace" msgid "scope" -msgstr "" +msgstr "scope" msgid "name" -msgstr "" +msgstr "name" msgid "binding" -msgstr "" +msgstr "binding" msgid "from" -msgstr "" +msgstr "from" msgid "import statement" -msgstr "" +msgstr "import statement" msgid "free" -msgstr "" +msgstr "free" msgid "variable" -msgstr "" +msgstr "variable" msgid "environment" -msgstr "" +msgstr "environment" msgid "NameError (built-in exception)" -msgstr "" +msgstr "NameError (built-in exception)" msgid "UnboundLocalError" -msgstr "" +msgstr "UnboundLocalError" msgid "module" -msgstr "" +msgstr "module" msgid "__main__" -msgstr "" +msgstr "__main__" msgid "restricted" -msgstr "" +msgstr "restricted" msgid "exception" -msgstr "" +msgstr "exception" msgid "raise an exception" -msgstr "" +msgstr "raise an exception" msgid "handle an exception" -msgstr "" +msgstr "handle an exception" msgid "exception handler" -msgstr "" +msgstr "exception handler" msgid "errors" -msgstr "" +msgstr "errors" msgid "error handling" -msgstr "" +msgstr "error handling" msgid "termination model" -msgstr "" +msgstr "termination model" msgid "SystemExit (built-in exception)" -msgstr "" +msgstr "SystemExit (built-in exception)" From fa0e581ac1815e24698dba44fe85f6e8db12f9fc Mon Sep 17 00:00:00 2001 From: JystBreisgau Date: Tue, 18 Aug 2026 09:46:27 +0200 Subject: [PATCH 3/8] Fix formatting issues in /reference/executionmodel.po --- reference/executionmodel.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/reference/executionmodel.po b/reference/executionmodel.po index 2c65c797..836168be 100644 --- a/reference/executionmodel.po +++ b/reference/executionmodel.po @@ -49,7 +49,7 @@ msgstr "" "Codeblock. Ein Skriptbefehl (ein Befehl, der in der Befehlszeile des " "Interpreters mit der Option :option:`-c` angegeben wird) ist ein " "Codeblock. Ein Modul, das als Skript der obersten Ebene (als Modul " -"``__main__`` “) über die Befehlszeile mit dem Argument :option:`-m` " +"``__main__`` ) über die Befehlszeile mit dem Argument :option:`-m` " "ausgeführt wird, ist ebenfalls ein Codeblock. Das an die integrierten " "Funktionen :func:`eval` und :func:`exec` übergebene " "Zeichenfolgenargument ist ein Codeblock." @@ -253,12 +253,12 @@ msgstr "" "die Zuordnungen dieser Namen im obersten Namensraum. Namen werden im " "obersten Namensraum aufgelöst, indem der globale Namensraum, d. h. der " "Namensraum des Moduls, das den Codeblock enthält, sowie der " -"„builtins“-Namensraum, der Namensraum des Moduls :mod:`builtins`, " +"\"builtins\“-Namensraum, der Namensraum des Moduls :mod:`builtins`, " "durchsucht werden. Der globale Namensraum wird zuerst durchsucht. Werden die" -" Namen dort nicht gefunden, wird als Nächstes der „builtins“-Namensraum " -"durchsucht. Werden die Namen auch im „builtins“-Namensraum nicht gefunden, " +" Namen dort nicht gefunden, wird als Nächstes der \"builtins\“-Namensraum " +"durchsucht. Werden die Namen auch im \"builtins\“-Namensraum nicht gefunden, " "werden neue Variablen im globalen Namensraum angelegt. Die Anweisung " -"„global“ muss allen Verwendungen der aufgeführten Namen vorangestellt " +"\"global\“ muss allen Verwendungen der aufgeführten Namen vorangestellt " "werden." msgid "" @@ -582,7 +582,7 @@ msgid "" msgstr "" "Benutzer sollten ``__builtins__`` nicht ändern; es handelt sich dabei " "ausschließlich um ein Implementierungsdetail. Benutzer, die Werte im " -"Namespace „builtins“ überschreiben möchten, sollten das Modul " +"Namespace \"builtins\“ überschreiben möchten, sollten das Modul " ":mod:`builtins` über :keyword:`import` laden und dessen Attribute " "entsprechend anpassen." @@ -831,7 +831,7 @@ msgid "" msgstr "" "Das Wesentliche an Threads ist, dass jeder einzelne unabhängig von den " "anderen *läuft*, und zwar gleichzeitig mit ihnen. Das kann entweder nur " -"konzeptionell gleichzeitig („konkurrent“) oder physisch („parallel“) der " +"konzeptionell gleichzeitig (\"konkurrent\“) oder physisch (\"parallel\“) der " "Fall sein. So oder so laufen die Threads effektiv mit einer nicht " "synchronisierten Geschwindigkeit." From fbc22e765bd28ec86ef98e484d9aba9e46d3743c Mon Sep 17 00:00:00 2001 From: JystBreisgau Date: Tue, 18 Aug 2026 10:44:21 +0200 Subject: [PATCH 4/8] Improve German translations in /reference/import.po Updated German translations in import.po for clarity and accuracy, including corrections to phrases and terminology. --- reference/import.po | 104 ++++++++++++++++++++++---------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/reference/import.po b/reference/import.po index a56a958c..208105c7 100644 --- a/reference/import.po +++ b/reference/import.po @@ -645,7 +645,7 @@ msgid "" msgstr "" "Pythons Standard- :data:`sys.meta_path` verfügt über drei Meta-Pfadfinder: " "einen, der weiß, wie man integrierte Module importiert, einen, der weiß, wie" -" man „frozen“ Module importiert, und einen, der weiß, wie man Module aus " +" man \"frozen\“ Module importiert, und einen, der weiß, wie man Module aus " "einem :term:`Importpfad` importiert (d. h. den :term:`pfadbasierten " "Finder`)." @@ -677,7 +677,7 @@ msgstr "" ":meth:`~importlib.abc.MetaPathFinder.find_spec`." msgid "Loading" -msgstr "Wird geladen" +msgstr "Module laden" msgid "" "If and when a module spec is found, the import machinery will use it (and " @@ -721,18 +721,18 @@ msgid "" msgstr "" "module = None\n" "if spec.loader is not None and hasattr(spec.loader, 'create_module'):\n" -" # It is assumed 'exec_module' will also be defined on the loader.\n" +" # Es wird davon ausgegangen, dass \"exec_module\“ ebenfalls auf dem Loader definiert ist..\n" " module = spec.loader.create_module(spec)\n" "if module is None:\n" " module = ModuleType(spec.name)\n" -"# The import-related module attributes get set here:\n" +"# Die importbezogenen Modulattribute werden hier gesetzt.:\n" "_init_module_attrs(spec, module)\n" "\n" "if spec.loader is None:\n" -" # unsupported\n" +" # nicht unterstützt\n" " raise ImportError\n" "if spec.origin is None and spec.submodule_search_locations is not None:\n" -" # namespace package\n" +" # Namensraumpaket\n" " sys.modules[spec.name] = module\n" "elif not hasattr(spec.loader, 'exec_module'):\n" " module = spec.loader.load_module(spec.name)\n" @@ -749,7 +749,7 @@ msgstr "" "return sys.modules[spec.name]" msgid "Note the following details:" -msgstr "Beachten Sie bitte folgende Details:" +msgstr "Beachte bitte folgende Details:" msgid "" "If there is an existing module object with the given name in " @@ -794,7 +794,7 @@ msgid "" msgstr "" "Nachdem das Modul erstellt wurde, aber noch vor seiner Ausführung, legt der " "Importmechanismus die importbezogenen Modulattribute fest " -"(„_init_module_attrs“ im obigen Pseudocode-Beispiel), wie in einem " +"(\"_init_module_attrs\“ im obigen Pseudocode-Beispiel), wie in einem " ":ref:`späteren Abschnitt ` zusammengefasst." msgid "" @@ -824,7 +824,7 @@ msgstr "" "ausgeführt." msgid "Loaders" -msgstr "Lader" +msgstr "Modullader" msgid "" "Module loaders provide the critical function of loading: module execution. " @@ -868,7 +868,7 @@ msgid "" " a spec with the loader set to ``self``." msgstr "" "In vielen Fällen können Finder und Loader dasselbe Objekt sein; in solchen " -"Fällen würde die Methode :meth:`~importlib.abc.MetaPathFinder.find_spec` “" +"Fällen würde die Methode :meth:`~importlib.abc.MetaPathFinder.find_spec` " " lediglich eine Spezifikation zurückgeben, bei der der Loader auf ``self``" " gesetzt ist." @@ -891,7 +891,7 @@ msgstr "" msgid "The :meth:`~importlib.abc.Loader.create_module` method of loaders." msgstr "" -"Die :meth:`~importlib.abc.Loader.create_module` “-Methode bei Ladegeräten." +"Die :meth:`~importlib.abc.Loader.create_module` -Methode bei Modullader." msgid "" "The :meth:`~importlib.abc.Loader.load_module` method was replaced by " @@ -967,7 +967,7 @@ msgid "" "An :exc:`ImportError` is raised when ``exec_module()`` is defined but " "``create_module()`` is not." msgstr "" -"Eine :exc:`ImportError` “-Ausnahme wird ausgelöst, wenn " +"Eine :exc:`ImportError` -Ausnahme wird ausgelöst, wenn " "``exec_module()`` definiert ist, ``create_module()`` jedoch nicht." msgid "Use of ``load_module()`` will raise :exc:`ImportWarning`." @@ -1156,7 +1156,7 @@ msgid "" "attributes set above, and in the module's spec, you can more explicitly " "control the repr of module objects." msgstr "" -"Standardmäßig verfügen alle Module über eine verwendbare \"repr\“-Darstellung." +"Standardmäßig verfügen alle Module über eine verwendbare \"repr\“ (Repräsentanten) Darstellung." " Je nach den oben festgelegten Attributen und den Angaben in der Modul-" "Spezifikation können Sie die \"repr\“-Darstellung von Modulobjekten jedoch " "expliziter steuern." @@ -1231,7 +1231,7 @@ msgid "" " cache file by checking the stored metadata in the cache file against the " "source's metadata." msgstr "" -"Bevor Python zwischengespeicherten Bytecode aus einer ``.pyc`` “-Datei " +"Bevor Python zwischengespeicherten Bytecode aus einer ``.pyc`` -Datei " "lädt, prüft es, ob der Cache mit der Quelldatei ``.py`` auf dem neuesten" " Stand ist. Standardmäßig speichert Python dazu beim Schreiben der Cache-" "Datei den Zeitstempel der letzten Änderung sowie die Größe der Quelldatei in" @@ -1268,7 +1268,7 @@ msgid "" "Added hash-based ``.pyc`` files. Previously, Python only supported " "timestamp-based invalidation of bytecode caches." msgstr "" -"Es wurden Hash-basierte ``.pyc`` “-Dateien hinzugefügt. Bisher " +"Es wurden Hash-basierte ``.pyc`` -Dateien hinzugefügt. Bisher " "unterstützte Python nur die zeitstempelbasierte Ungültigkeitserklärung von " "Bytecode-Caches." @@ -1336,9 +1336,9 @@ msgid "" " from the web." msgstr "" "Der pfadbasierte Finder bietet zusätzliche Hooks und Protokolle, mit denen " -"Sie die Arten der durchsuchbaren Pfadeinträge erweitern und anpassen können." -" Wenn Sie beispielsweise Pfadeinträge als Netzwerk-URLs unterstützen " -"möchten, könnten Sie einen Hook schreiben, der HTTP-Semantik implementiert, " +"du die Arten der durchsuchbaren Pfadeinträge erweitern und anpassen können." +" Wenn du beispielsweise Pfadeinträge als Netzwerk-URLs unterstützen " +"möchtest, kannst du einen Hook schreiben, der HTTP-Semantik implementiert, " "um Module im Internet zu finden. Dieser Hook (ein Callable) würde einen " ":term:`Pfadeintrags-Finder` zurückgeben, der das unten beschriebene " "Protokoll unterstützt, mit dem dann ein Loader für das Modul aus dem Web " @@ -1369,7 +1369,7 @@ msgid "" "removed from :data:`sys.meta_path`, none of the path entry finder semantics " "would be invoked." msgstr "" -"Im Gegensatz dazu sind Pfadeintrags-Finder gewissermaßen ein " +"Im Gegensatz dazu sind Pfad-Eintrag-Finder gewissermaßen ein " "Implementierungsdetail des pfadbasierten Finders, und tatsächlich würde, " "wenn der pfadbasierte Finder aus :data:`sys.meta_path` entfernt würde, " "keine der Semantiken der Pfadeintrags-Finder aufgerufen werden." @@ -1510,7 +1510,7 @@ msgstr "" "Objekt erwarten; die Kodierung von Byte-Objekten bleibt dem Hook überlassen " "(z. B. kann es sich um eine Dateisystemkodierung, UTF-8 oder etwas anderes " "handeln), und wenn der Hook das Argument nicht dekodieren kann, sollte er " -"eine :exc:`ImportError` “-Ausnahme auslösen." +"eine :exc:`ImportError` -Ausnahme auslösen." msgid "" "If :data:`sys.path_hooks` iteration ends with no :term:`path entry finder` " @@ -1582,7 +1582,7 @@ msgstr "" "entgegen: den vollqualifizierten Namen des zu importierenden Moduls und das " "(optionale) Zielmodul. ``find_spec()`` gibt eine vollständig " "ausgefüllte Spezifikation für das Modul zurück. In dieser Spezifikation ist " -"„loader“ immer gesetzt (mit einer Ausnahme)." +"\"\loader\“ immer gesetzt (mit einer Ausnahme)." msgid "" "To indicate to the import machinery that the spec represents a namespace " @@ -1598,7 +1598,7 @@ msgid "" ":meth:`!find_loader` and :meth:`!find_module`, both of which are now " "deprecated, but will be used if ``find_spec()`` is not defined." msgstr "" -":meth:`~importlib.abc.PathEntryFinder.find_spec` Ersetzt " +":meth:`~importlib.abc.PathEntryFinder.find_spec` ersetzt " ":meth:`!find_loader` und :meth:`!find_module`, die beide mittlerweile " "veraltet sind, jedoch verwendet werden, wenn ``find_spec()`` nicht definiert" " ist." @@ -1650,7 +1650,7 @@ msgid "" msgstr "" "Die Methode ``find_module()`` bei Pfadeintragsfindern ist veraltet, da " "sie es dem Pfadeintragsfinder nicht ermöglicht, Teile zu Namespace-Paketen " -"beizusteuern. Wenn bei einem Pfadeintragsfinder sowohl ``find_loader()`` “" +"beizusteuern. Wenn bei einem Pfadeintragsfinder sowohl ``find_loader()`` " " als auch ``find_module()`` vorhanden sind, ruft das Import-System immer" " ``find_loader()`` vorrangig vor ``find_module()`` auf." @@ -1698,7 +1698,7 @@ msgstr "" "gezielt zu verhindern (anstatt das Standard-Import-System vollständig zu " "deaktivieren), reicht es aus, direkt von " ":meth:`~importlib.abc.MetaPathFinder.find_spec` aus eine " -":exc:`ModuleNotFoundError` “-Ausnahme auszulösen, anstatt ``None`` " +":exc:`ModuleNotFoundError` -Ausnahme auszulösen, anstatt ``None`` " "zurückzugeben. Letzteres signalisiert, dass die Suche im Meta-Pfad " "fortgesetzt werden soll, während das Auslösen einer Ausnahme diese sofort " "beendet." @@ -1793,7 +1793,7 @@ msgstr "" "von Python einen Sonderfall dar. Wie bereits an anderer Stelle erwähnt " ":ref:` `, wird das Modul ``__main__`` direkt beim Start des " "Interpreters initialisiert, ähnlich wie :mod:`sys` und :mod:`builtins`" -" “. Im Gegensatz zu diesen beiden Modulen gilt es jedoch nicht streng " +". Im Gegensatz zu diesen beiden Modulen gilt es jedoch nicht streng " "genommen als integriertes Modul. Dies liegt daran, dass die Art und Weise, " "wie ``__main__`` initialisiert wird, von den Flags und anderen Optionen " "abhängt, mit denen der Interpreter aufgerufen wird." @@ -1849,7 +1849,7 @@ msgid "" " the :option:`-m` switch if valid module metadata is desired in " ":mod:`__main__`." msgstr "" -"Beachten Sie, dass ``__main__.__spec__`` im letzten Fall immer " +"Beachte, dass ``__main__.__spec__`` im letzten Fall immer " "``None`` ist, *selbst wenn* die Datei technisch gesehen stattdessen direkt" " als Modul importiert werden könnte. Verwenden Sie den Schalter " ":option:`-m`, wenn gültige Modul-Metadaten in :mod:`__main__` " @@ -1862,11 +1862,11 @@ msgid "" "__name__ == \"__main__\":`` checks only execute when the module is used to " "populate the ``__main__`` namespace, and not during normal import." msgstr "" -"Beachten Sie außerdem, dass selbst wenn ``__main__`` einem " +"Beachte außerdem, dass selbst wenn ``__main__`` einem " "importierbaren Modul entspricht und ``__main__.__spec__`` entsprechend " "gesetzt ist, diese dennoch als *unterschiedliche* Module betrachtet werden. " "Dies liegt daran, dass Blöcke, die durch ``if __name__ == \"__main__\":`` " -"“-Prüfungen geschützt sind, nur dann ausgeführt werden, wenn das Modul zum " +"-Prüfungen geschützt sind, nur dann ausgeführt werden, wenn das Modul zum " "Befüllen des Namensraums ``__main__`` verwendet wird, nicht jedoch " "während eines normalen Imports." @@ -1927,7 +1927,7 @@ msgid "" " of several APIs in the import system and also addition of new methods to " "finders and loaders." msgstr "" -":pep:`451` Fügt die Kapselung des Importstatus pro Modul in " +":pep:`451` fügt die Kapselung des Importstatus pro Modul in " "Spezifikationsobjekten hinzu. Zudem werden die meisten Routineaufgaben der " "Loader wieder auf die Importmechanismen verlagert. Diese Änderungen " "ermöglichen die Abkündigung mehrerer APIs im Importsystem sowie die " @@ -1954,70 +1954,70 @@ msgstr "" "Funktionieren in anderen Python-Implementierungen nicht garantiert ist." msgid "import machinery" -msgstr "" +msgstr "import machinery" msgid "package" -msgstr "" +msgstr "package" msgid "regular" -msgstr "" +msgstr "regular" msgid "namespace" -msgstr "" +msgstr "namespace" msgid "portion" -msgstr "" +msgstr "portion" msgid "sys.modules" -msgstr "" +msgstr "sys.modules" msgid "finder" -msgstr "" +msgstr "finder" msgid "loader" -msgstr "" +msgstr "loader" msgid "module spec" -msgstr "" +msgstr "module spec"" msgid "import hooks" -msgstr "" +msgstr "import hooks"" msgid "meta hooks" -msgstr "" +msgstr "meta hooks"" msgid "path hooks" -msgstr "" +msgstr "path hooks"" msgid "hooks" -msgstr "" +msgstr "hooks" msgid "import" -msgstr "" +msgstr "import" msgid "meta" -msgstr "" +msgstr "meta" msgid "path" -msgstr "" +msgstr "path" msgid "sys.meta_path" -msgstr "" +msgstr "sys.meta_path"" msgid "find_spec" -msgstr "" +msgstr "find_spec"" msgid "path based finder" -msgstr "" +msgstr "path based finder"" msgid "sys.path" -msgstr "" +msgstr "sys.path"" msgid "sys.path_hooks" -msgstr "" +msgstr "sys.path_hooks"" msgid "sys.path_importer_cache" -msgstr "" +msgstr "sys.path_importer_cache"" msgid "PYTHONPATH" -msgstr "" +msgstr "PYTHONPATH" From 5c7439ad6ce56dab5e180abb497f7afb1e4c3e16 Mon Sep 17 00:00:00 2001 From: JystBreisgau Date: Thu, 20 Aug 2026 15:22:35 +0200 Subject: [PATCH 5/8] Strating translation into German /reference/compound_stmts.po --- reference/compound_stmts.po | 1810 +++++++++++++++++++++++++++-------- 1 file changed, 1388 insertions(+), 422 deletions(-) diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index 11073ea5..67bd7914 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -21,8 +21,9 @@ msgstr "" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" + msgid "Compound statements" -msgstr "" +msgstr "Zusammengesetzte Anweisungen" msgid "" "Compound statements contain (groups of) other statements; they affect or " @@ -30,15 +31,27 @@ msgid "" "compound statements span multiple lines, although in simple incarnations a " "whole compound statement may be contained in one line." msgstr "" +"Zusammengesetzte Anweisungen enthalten (Gruppen von) anderen Anweisungen; " +"sie beeinflussen oder steuern in gewisser Weise die Ausführung dieser " +"anderen Anweisungen. Im Allgemeinen erstrecken sich zusammengesetzte " +"Anweisungen über mehrere Zeilen, obwohl in einfachen Fällen eine gesamte " +"zusammengesetzte Anweisung auch in einer einzigen Zeile enthalten sein kann." msgid "" "The :keyword:`if`, :keyword:`while` and :keyword:`for` statements implement " "traditional control flow constructs. :keyword:`try` specifies exception " -"handlers and/or cleanup code for a group of statements, while the :keyword:" -"`with` statement allows the execution of initialization and finalization " -"code around a block of code. Function and class definitions are also " -"syntactically compound statements." +"handlers and/or cleanup code for a group of statements, while the " +":keyword:`with` statement allows the execution of initialization and " +"finalization code around a block of code. Function and class definitions " +"are also syntactically compound statements." msgstr "" +"Die Anweisungen :keyword:`if`, :keyword:`while` und :keyword:`for`" +" implementieren traditionelle Kontrollflusskonstrukte. :keyword:`try` " +"legt Ausnahmebehandler und/oder Aufräumcode für eine Gruppe von Anweisungen " +"fest, während die Anweisung :keyword:`with` die Ausführung von " +"Initialisierungs- und Finalisierungscode um einen Codeblock herum " +"ermöglicht. Funktions- und Klassendefinitionen sind syntaktisch ebenfalls " +"zusammengesetzte Anweisungen." msgid "" "A compound statement consists of one or more 'clauses.' A clause consists " @@ -49,44 +62,71 @@ msgid "" "semicolon-separated simple statements on the same line as the header, " "following the header's colon, or it can be one or more indented statements " "on subsequent lines. Only the latter form of a suite can contain nested " -"compound statements; the following is illegal, mostly because it wouldn't be " -"clear to which :keyword:`if` clause a following :keyword:`else` clause would " -"belong::" -msgstr "" +"compound statements; the following is illegal, mostly because it wouldn't be" +" clear to which :keyword:`if` clause a following :keyword:`else` clause " +"would belong::" +msgstr "" +"Eine zusammengesetzte Anweisung besteht aus einer oder mehreren \"Klauseln\". " +"Eine Klausel besteht aus einer Überschrift und einer \"Suite\". Die " +"Klauselüberschriften einer bestimmten zusammengesetzten Anweisung befinden " +"sich alle auf derselben Einrückungsebene. Jede Klauselüberschrift beginnt " +"mit einem eindeutig identifizierenden Schlüsselwort und endet mit einem " +"Doppelpunkt. Eine Suite ist eine Gruppe von Anweisungen, die von einer " +"Klausel gesteuert werden. Eine Suite kann aus einer oder mehreren durch " +"Semikolons getrennten einfachen Anweisungen bestehen, die sich in derselben " +"Zeile wie die Überschrift befinden und auf den Doppelpunkt der Überschrift " +"folgen, oder aus einer oder mehreren eingerückten Anweisungen in den " +"folgenden Zeilen. Nur die letztgenannte Form einer Suite darf " +"verschachtelte zusammengesetzte Anweisungen enthalten; das folgende Beispiel" +" ist unzulässig, vor allem weil unklar wäre, zu welcher :keyword:`if` " +"-Klausel eine nachfolgende :keyword:`else` -Klausel gehören würde::" msgid "if test1: if test2: print(x)" -msgstr "" +msgstr "if test1: if test2: print(x)" msgid "" "Also note that the semicolon binds tighter than the colon in this context, " "so that in the following example, either all or none of the :func:`print` " "calls are executed::" msgstr "" +"Beachten Sie außerdem, dass das Semikolon in diesem Zusammenhang eine " +"stärkere Bindung hat als der Doppelpunkt, sodass im folgenden Beispiel " +"entweder alle oder gar keine der :func:`print` -Aufrufe ausgeführt " +"werden::" msgid "if x < y < z: print(x); print(y); print(z)" -msgstr "" +msgstr "Wenn x < y < z: print(x); print(y); print(z)" msgid "Summarizing:" -msgstr "" +msgstr "Zusammenfassend lässt sich sagen:" msgid "" "Note that statements always end in a ``NEWLINE`` possibly followed by a " "``DEDENT``. Also note that optional continuation clauses always begin with " "a keyword that cannot start a statement, thus there are no ambiguities (the " -"'dangling :keyword:`else`' problem is solved in Python by requiring nested :" -"keyword:`if` statements to be indented)." +"'dangling :keyword:`else`' problem is solved in Python by requiring nested " +":keyword:`if` statements to be indented)." msgstr "" +"Beachten Sie, dass Anweisungen immer mit einem ``NEWLINE`` enden, auf " +"das möglicherweise ein ``DEDENT`` folgt. Beachten Sie außerdem, dass " +"optionale Fortsetzungsklauseln immer mit einem Schlüsselwort beginnen, das " +"keine Anweisung einleiten darf, sodass keine Mehrdeutigkeiten entstehen (das" +" Problem der dangling :keyword:`else` wird in Python dadurch gelöst, dass" +" verschachtelte :keyword:`if` -Anweisungen eingerückt sein müssen)." msgid "" "The formatting of the grammar rules in the following sections places each " "clause on a separate line for clarity." msgstr "" +"Zur besseren Übersichtlichkeit werden die Grammatikregeln in den folgenden " +"Abschnitten so formatiert, dass jeder Satzteil in einer eigenen Zeile steht." msgid "The :keyword:`!if` statement" -msgstr "" +msgstr "Die :keyword:`!if` Anweisung" msgid "The :keyword:`if` statement is used for conditional execution:" msgstr "" +"Die Anweisung :keyword:`if` wird für die bedingte Ausführung verwendet:" msgid "" "It selects exactly one of the suites by evaluating the expressions one by " @@ -96,60 +136,99 @@ msgid "" "expressions are false, the suite of the :keyword:`else` clause, if present, " "is executed." msgstr "" +"Es wählt genau eine der Suiten aus, indem es die Ausdrücke nacheinander " +"auswertet, bis einer als wahr erkannt wird (siehe Abschnitt " +":ref:`booleans` für die Definition von \"wahr\"; und \"falsch\".; anschließend " +"wird diese Suite ausgeführt (und kein anderer Teil der Anweisung " +":keyword:`if` wird ausgeführt oder ausgewertet). Sind alle Ausdrücke " +"falsch, wird die Suite der Klausel :keyword:`else` ausgeführt, sofern " +"vorhanden." msgid "The :keyword:`!while` statement" -msgstr "" +msgstr "Die Erklärung der :keyword:`!while` . msgid "" "The :keyword:`while` statement is used for repeated execution as long as an " "expression is true:" msgstr "" +"Die Anweisung :keyword:`while` wird verwendet, um einen Befehl so lange " +"wiederholt auszuführen, wie ein Ausdruck wahr ist:" msgid "" "This repeatedly tests the expression and, if it is true, executes the first " -"suite; if the expression is false (which may be the first time it is tested) " -"the suite of the :keyword:`!else` clause, if present, is executed and the " +"suite; if the expression is false (which may be the first time it is tested)" +" the suite of the :keyword:`!else` clause, if present, is executed and the " "loop terminates." msgstr "" +"Dadurch wird der Ausdruck wiederholt geprüft; ist er wahr, wird die erste " +"Suite ausgeführt; ist der Ausdruck falsch (was bereits bei der ersten " +"Prüfung der Fall sein kann), wird die Suite der Klausel :keyword:`!else` . +" – sofern vorhanden – ausgeführt, und die Schleife wird beendet." msgid "" -"A :keyword:`break` statement executed in the first suite terminates the loop " -"without executing the :keyword:`!else` clause's suite. A :keyword:" -"`continue` statement executed in the first suite skips the rest of the suite " -"and goes back to testing the expression." +"A :keyword:`break` statement executed in the first suite terminates the loop" +" without executing the :keyword:`!else` clause's suite. A " +":keyword:`continue` statement executed in the first suite skips the rest of " +"the suite and goes back to testing the expression." msgstr "" +"Eine in der ersten Suite ausgeführte Anweisung vom Typ :keyword:`break` " +"beendet die Schleife, ohne die Suite der Klausel :keyword:`!else` " +"auszuführen. Eine in der ersten Suite ausgeführte Anweisung vom Typ " +":keyword:`continue` überspringt den Rest der Suite und kehrt zur " +"Überprüfung des Ausdrucks zurück." msgid "The :keyword:`!for` statement" -msgstr "" +msgstr "Die :keyword:`!for` Anweisung" msgid "" "The :keyword:`for` statement is used to iterate over the elements of a " "sequence (such as a string, tuple or list) or other iterable object:" msgstr "" +"Die Anweisung :keyword:`for` wird verwendet, um die Elemente einer " +"Sequenz (wie beispielsweise einer Zeichenkette, eines Tupels oder einer " +"Liste) oder eines anderen iterierbaren Objekts nacheinander durchzugehen:" msgid "" -"The :token:`~python-grammar:starred_expression_list` expression is evaluated " -"once; it should yield an :term:`iterable` object. An :term:`iterator` is " +"The :token:`~python-grammar:starred_expression_list` expression is evaluated" +" once; it should yield an :term:`iterable` object. An :term:`iterator` is " "created for that iterable. The first item provided by the iterator is then " -"assigned to the target list using the standard rules for assignments (see :" -"ref:`assignment`), and the suite is executed. This repeats for each item " -"provided by the iterator. When the iterator is exhausted, the suite in the :" -"keyword:`!else` clause, if present, is executed, and the loop terminates." -msgstr "" - -msgid "" -"A :keyword:`break` statement executed in the first suite terminates the loop " -"without executing the :keyword:`!else` clause's suite. A :keyword:" -"`continue` statement executed in the first suite skips the rest of the suite " -"and continues with the next item, or with the :keyword:`!else` clause if " -"there is no next item." -msgstr "" +"assigned to the target list using the standard rules for assignments (see " +":ref:`assignment`), and the suite is executed. This repeats for each item " +"provided by the iterator. When the iterator is exhausted, the suite in the " +":keyword:`!else` clause, if present, is executed, and the loop terminates." +msgstr "" +"Der Ausdruck :token:`~python-grammar:starred_expression_list` wird " +"einmal ausgewertet; er sollte ein :term:`iterable`-Objekt zurückgeben. Für " +"dieses iterable-Objekt wird ein :term:`iterator` erstellt. Das erste vom " +"Iterator gelieferte Element wird dann gemäß den Standardregeln für " +"Zuweisungen (siehe :ref:`assignment`) der Zielliste zugewiesen, und die " +"Suite wird ausgeführt. Dies wiederholt sich für jedes vom Iterator " +"gelieferte Element. Wenn der Iterator erschöpft ist, wird die Suite in der " +"Klausel :keyword:`!else` (sofern vorhanden) ausgeführt, und die Schleife" +" wird beendet." + +msgid "" +"A :keyword:`break` statement executed in the first suite terminates the loop" +" without executing the :keyword:`!else` clause's suite. A " +":keyword:`continue` statement executed in the first suite skips the rest of " +"the suite and continues with the next item, or with the :keyword:`!else` " +"clause if there is no next item." +msgstr "" +"Eine in der ersten Suite ausgeführte Anweisung :keyword:`break` beendet " +"die Schleife, ohne die Suite der Klausel :keyword:`!else` auszuführen. " +"Eine in der ersten Suite ausgeführte Anweisung :keyword:`continue` " +"überspringt den Rest der Suite und fährt mit dem nächsten Element fort oder," +" falls kein nächstes Element vorhanden ist, mit der Klausel " +":keyword:`!else` ." msgid "" "The for-loop makes assignments to the variables in the target list. This " "overwrites all previous assignments to those variables including those made " "in the suite of the for-loop::" msgstr "" +"Die for-Schleife führt Zuweisungen an die Variablen in der Zielliste durch. " +"Dadurch werden alle vorherigen Zuweisungen an diese Variablen überschrieben," +" einschließlich derer, die im Rahmen der for-Schleife vorgenommen wurden::" msgid "" "for i in range(10):\n" @@ -158,98 +237,156 @@ msgid "" " # because i will be overwritten with the next\n" " # index in the range" msgstr "" +"for i in range(10):\n" +" print(i)\n" +" i = 5 # Dies hat keinen Einfluss auf die for-Schleife,\n" +" # da i durch den nächsten\n" +" # Index im Bereich überschrieben wird" msgid "" "Names in the target list are not deleted when the loop is finished, but if " "the sequence is empty, they will not have been assigned to at all by the " -"loop. Hint: the built-in type :func:`range` represents immutable arithmetic " -"sequences of integers. For instance, iterating ``range(3)`` successively " +"loop. Hint: the built-in type :func:`range` represents immutable arithmetic" +" sequences of integers. For instance, iterating ``range(3)`` successively " "yields 0, 1, and then 2." msgstr "" +"Die Namen in der Zielliste werden nach Beendigung der Schleife nicht " +"gelöscht, aber wenn die Folge leer ist, wurden sie von der Schleife gar " +"nicht erst zugewiesen. Hinweis: Der integrierte Typ :func:`range` stellt" +" unveränderliche arithmetische Folgen von Ganzzahlen dar. Wenn man " +"beispielsweise nacheinander ``range(3)`` durchläuft, erhält man " +"nacheinander 0, 1 und dann 2." msgid "Starred elements are now allowed in the expression list." -msgstr "" +msgstr "Elemente mit Sternchen sind nun in der Ausdrucksliste zulässig." msgid "The :keyword:`!try` statement" -msgstr "" +msgstr "Die :keyword:`!try` Anweisung" msgid "" "The :keyword:`!try` statement specifies exception handlers and/or cleanup " "code for a group of statements:" msgstr "" +"Die Anweisung :keyword:`!try` legt Ausnahmebehandler und/oder " +"Aufräumcode für eine Gruppe von Anweisungen fest:" msgid "" -"Additional information on exceptions can be found in section :ref:" -"`exceptions`, and information on using the :keyword:`raise` statement to " -"generate exceptions may be found in section :ref:`raise`." +"Additional information on exceptions can be found in section " +":ref:`exceptions`, and information on using the :keyword:`raise` statement " +"to generate exceptions may be found in section :ref:`raise`." msgstr "" +"Weitere Informationen zu Ausnahmen finden Sie im Abschnitt " +":ref:`exceptions`, und Informationen zur Verwendung der Anweisung " +":keyword:`raise` zum Auslösen von Ausnahmen finden Sie im Abschnitt " +":ref:`raise` ." msgid "" "Support for optionally dropping grouping parentheses when using multiple " "exception types. See :pep:`758`." msgstr "" +"Unterstützung für das optionale Weglassen von Gruppierungsklammern bei der " +"Verwendung mehrerer Ausnahmetypen. Siehe :pep:`758`." msgid ":keyword:`!except` clause" -msgstr "" +msgstr ":keyword:`!except` Klausel" msgid "" "The :keyword:`!except` clause(s) specify one or more exception handlers. " "When no exception occurs in the :keyword:`try` clause, no exception handler " -"is executed. When an exception occurs in the :keyword:`!try` suite, a search " -"for an exception handler is started. This search inspects the :keyword:`!" -"except` clauses in turn until one is found that matches the exception. An " -"expression-less :keyword:`!except` clause, if present, must be last; it " -"matches any exception." -msgstr "" +"is executed. When an exception occurs in the :keyword:`!try` suite, a search" +" for an exception handler is started. This search inspects the " +":keyword:`!except` clauses in turn until one is found that matches the " +"exception. An expression-less :keyword:`!except` clause, if present, must be" +" last; it matches any exception." +msgstr "" +"Die Klausel(n) :keyword:`!except` legen einen oder mehrere " +"Ausnahmebehandler fest. Tritt in der Klausel :keyword:`try` keine " +"Ausnahme auf, wird kein Ausnahmebehandler ausgeführt. Tritt in der Suite " +":keyword:`!try` eine Ausnahme auf, wird eine Suche nach einem " +"Ausnahmebehandler gestartet. Bei dieser Suche werden die Klauseln " +":keyword:`!except` nacheinander durchgesehen, bis eine gefunden wird, die " +"der Ausnahme entspricht. Eine ausdruckslose :keyword:`!except` -Klausel " +"muss, sofern vorhanden, an letzter Stelle stehen; sie passt auf jede " +"Ausnahme." msgid "" "For an :keyword:`!except` clause with an expression, the expression must " -"evaluate to an exception type or a tuple of exception types. Parentheses can " -"be dropped if multiple exception types are provided and the ``as`` clause is " -"not used. The raised exception matches an :keyword:`!except` clause whose " -"expression evaluates to the class or a :term:`non-virtual base class " +"evaluate to an exception type or a tuple of exception types. Parentheses can" +" be dropped if multiple exception types are provided and the ``as`` clause " +"is not used. The raised exception matches an :keyword:`!except` clause whose" +" expression evaluates to the class or a :term:`non-virtual base class " "` of the exception object, or to a tuple that contains " "such a class." msgstr "" +"Bei einer :keyword:`!except` -Klausel mit einem Ausdruck muss der " +"Ausdruck zu einem Ausnahmetyp oder einem Tupel von Ausnahmetypen ausgewertet" +" werden. Klammern können weggelassen werden, wenn mehrere Ausnahmetypen " +"angegeben werden und die Klausel ``as`` nicht verwendet wird. Die " +"ausgelöste Ausnahme entspricht einer Klausel :keyword:`!except`, deren " +"Ausdruck zu der Klasse oder einer :term:`nicht-virtuellen Basisklasse " +"` des Ausnahmeobjekts oder zu einem Tupel, das eine " +"solche Klasse enthält, ausgewertet wird." msgid "" "If no :keyword:`!except` clause matches the exception, the search for an " "exception handler continues in the surrounding code and on the invocation " "stack. [#]_" msgstr "" +"Wenn keine :keyword:`!except` -Klausel mit der Ausnahme übereinstimmt, " +"wird die Suche nach einem Ausnahmehandler im umgebenden Code und auf dem " +"Aufrufstapel fortgesetzt. [#]_" msgid "" "If the evaluation of an expression in the header of an :keyword:`!except` " "clause raises an exception, the original search for a handler is canceled " -"and a search starts for the new exception in the surrounding code and on the " -"call stack (it is treated as if the entire :keyword:`try` statement raised " +"and a search starts for the new exception in the surrounding code and on the" +" call stack (it is treated as if the entire :keyword:`try` statement raised " "the exception)." msgstr "" +"Wenn bei der Auswertung eines Ausdrucks im Kopf einer :keyword:`!except` " +"`-Klausel eine Ausnahme ausgelöst wird, wird die ursprüngliche Suche nach " +"einem Handler abgebrochen und es wird im umgebenden Code sowie auf dem " +"Aufrufstapel nach einem Handler für die neue Ausnahme gesucht (es wird so " +"behandelt, als hätte die gesamte :keyword:`try` `-Anweisung die Ausnahme " +"ausgelöst)." msgid "" "When a matching :keyword:`!except` clause is found, the exception is " -"assigned to the target specified after the :keyword:`!as` keyword in that :" -"keyword:`!except` clause, if present, and the :keyword:`!except` clause's " +"assigned to the target specified after the :keyword:`!as` keyword in that " +":keyword:`!except` clause, if present, and the :keyword:`!except` clause's " "suite is executed. All :keyword:`!except` clauses must have an executable " "block. When the end of this block is reached, execution continues normally " "after the entire :keyword:`try` statement. (This means that if two nested " -"handlers exist for the same exception, and the exception occurs in the :" -"keyword:`!try` clause of the inner handler, the outer handler will not " +"handlers exist for the same exception, and the exception occurs in the " +":keyword:`!try` clause of the inner handler, the outer handler will not " "handle the exception.)" msgstr "" +"Wird eine passende :keyword:`!except` -Klausel gefunden, wird die " +"Ausnahme dem Ziel zugewiesen, das nach dem Schlüsselwort :keyword:`!as` " +"in dieser :keyword:`!except` -Klausel angegeben ist, sofern vorhanden, " +"und die Suite der :keyword:`!except` -Klausel wird ausgeführt. Alle " +":keyword:`!except` -Klauseln müssen einen ausführbaren Block enthalten. " +"Wenn das Ende dieses Blocks erreicht ist, wird die Ausführung nach der " +"gesamten :keyword:`try` -Anweisung normal fortgesetzt. (Das bedeutet: " +"Wenn zwei verschachtelte Handler für dieselbe Ausnahme existieren und die " +"Ausnahme in der :keyword:`!try` -Klausel des inneren Handlers auftritt, " +"wird die Ausnahme vom äußeren Handler nicht behandelt.)" msgid "" "When an exception has been assigned using ``as target``, it is cleared at " -"the end of the :keyword:`!except` clause. This is as if ::" +"the end of the :keyword:`!except` clause. This is as if::" msgstr "" +"Wenn eine Ausnahme mit ``as target`` zugewiesen wurde, wird sie am Ende " +"der :keyword:`!except` `-Klausel zurückgesetzt. Dies entspricht folgendem " +"Code::" msgid "" "except E as N:\n" " foo" msgstr "" -msgid "was translated to ::" -msgstr "" +msgid "was translated to::" +msgstr "wurde übersetzt in:" msgid "" "except E as N:\n" @@ -266,14 +403,26 @@ msgid "" "with the stack frame, keeping all locals in that frame alive until the next " "garbage collection occurs." msgstr "" +"Das bedeutet, dass der Ausnahme ein anderer Name zugewiesen werden muss, " +"damit nach der :keyword:`!except` `-Klausel auf sie verwiesen werden kann." +" Ausnahmen werden gelöscht, da sie mit dem ihnen beigefügten Traceback einen" +" Referenzzyklus mit dem Stack-Frame bilden, wodurch alle lokalen Variablen " +"in diesem Frame so lange erhalten bleiben, bis die nächste Garbage " +"Collection stattfindet." msgid "" "Before an :keyword:`!except` clause's suite is executed, the exception is " "stored in the :mod:`sys` module, where it can be accessed from within the " -"body of the :keyword:`!except` clause by calling :func:`sys.exception`. When " -"leaving an exception handler, the exception stored in the :mod:`sys` module " -"is reset to its previous value::" +"body of the :keyword:`!except` clause by calling :func:`sys.exception`. When" +" leaving an exception handler, the exception stored in the :mod:`sys` module" +" is reset to its previous value::" msgstr "" +"Bevor die Suite einer :keyword:`!except` -Klausel ausgeführt wird, wird " +"die Ausnahme im Modul :mod:`sys` gespeichert, wo im Körper der " +":keyword:`!except` -Klausel durch den Aufruf von :func:`sys.exception` " +"darauf zugegriffen werden kann. Beim Verlassen eines Ausnahmebehandlers wird" +" die im Modul :mod:`sys` gespeicherte Ausnahme auf ihren vorherigen Wert" +" zurückgesetzt::" msgid "" ">>> print(sys.exception())\n" @@ -296,38 +445,68 @@ msgid "" msgstr "" msgid ":keyword:`!except*` clause" -msgstr "" - -msgid "" -"The :keyword:`!except*` clause(s) specify one or more handlers for groups of " -"exceptions (:exc:`BaseExceptionGroup` instances). A :keyword:`try` statement " -"can have either :keyword:`except` or :keyword:`!except*` clauses, but not " -"both. The exception type for matching is mandatory in the case of :keyword:`!" -"except*`, so ``except*:`` is a syntax error. The type is interpreted as in " -"the case of :keyword:`!except`, but matching is performed on the exceptions " -"contained in the group that is being handled. An :exc:`TypeError` is raised " -"if a matching type is a subclass of :exc:`!BaseExceptionGroup`, because that " -"would have ambiguous semantics." -msgstr "" - -msgid "" -"When an exception group is raised in the try block, each :keyword:`!except*` " -"clause splits (see :meth:`~BaseExceptionGroup.split`) it into the subgroups " -"of matching and non-matching exceptions. If the matching subgroup is not " -"empty, it becomes the handled exception (the value returned from :func:`sys." -"exception`) and assigned to the target of the :keyword:`!except*` clause (if " -"there is one). Then, the body of the :keyword:`!except*` clause executes. If " -"the non-matching subgroup is not empty, it is processed by the next :keyword:" -"`!except*` in the same manner. This continues until all exceptions in the " -"group have been matched, or the last :keyword:`!except*` clause has run." -msgstr "" +msgstr ":keyword:`!except*` Klausel" + +msgid "" +"The :keyword:`!except*` clause(s) specify one or more handlers for groups of" +" exceptions (:exc:`BaseExceptionGroup` instances). A :keyword:`try` " +"statement can have either :keyword:`except` or :keyword:`!except*` clauses, " +"but not both. The exception type for matching is mandatory in the case of " +":keyword:`!except*`, so ``except*:`` is a syntax error. The type is " +"interpreted as in the case of :keyword:`!except`, but matching is performed " +"on the exceptions contained in the group that is being handled. A " +":exc:`TypeError` is raised if a matching type is a subclass of " +":exc:`!BaseExceptionGroup`, because that would have ambiguous semantics." +msgstr "" +"Die Klausel(n) :keyword:`!except*` legen einen oder mehrere Handler für " +"Gruppen von Ausnahmen (Instanzen von `:exc:`BaseExceptionGroup` `) fest. " +"Eine Anweisung :keyword:`try` kann entweder Klauseln vom Typ " +":keyword:`except` oder :keyword:`!except*` enthalten, jedoch nicht " +"beide. Der Ausnahmetyp für den Abgleich ist im Fall von " +":keyword:`!except*` obligatorisch, daher ist ``except*:`` ein " +"Syntaxfehler. Der Typ wird wie im Fall von :keyword:`!except` " +"interpretiert, der Abgleich erfolgt jedoch anhand der Ausnahmen, die in der " +"gerade behandelten Gruppe enthalten sind. Eine :exc:`TypeError` wird " +"ausgelöst, wenn ein übereinstimmender Typ eine Unterklasse von " +":exc:`!BaseExceptionGroup` ist, da dies zu einer mehrdeutigen Semantik " +"führen würde." + +msgid "" +"When an exception group is raised in the try block, each :keyword:`!except*`" +" clause splits (see :meth:`~BaseExceptionGroup.split`) it into the subgroups" +" of matching and non-matching exceptions. If the matching subgroup is not " +"empty, it becomes the handled exception (the value returned from " +":func:`sys.exception`) and assigned to the target of the :keyword:`!except*`" +" clause (if there is one). Then, the body of the :keyword:`!except*` clause " +"executes. If the non-matching subgroup is not empty, it is processed by the " +"next :keyword:`!except*` in the same manner. This continues until all " +"exceptions in the group have been matched, or the last :keyword:`!except*` " +"clause has run." +msgstr "" +"Wenn im \"try\"-Block eine Ausnahmegruppe ausgelöst wird, teilt jede " +":keyword:`!except*` -Klausel (siehe :meth:`~BaseExceptionGroup.split`) " +"diese in die Untergruppen der passenden und der nicht passenden Ausnahmen " +"auf. Ist die Untergruppe der passenden Ausnahmen nicht leer, wird sie zur " +"behandelten Ausnahme (dem von :func:`sys.exception` zurückgegebenen " +"Wert) und dem Ziel der :keyword:`!except*` -Klausel zugewiesen (sofern " +"vorhanden). Anschließend wird der Hauptteil der Klausel " +":keyword:`!except*` ausgeführt. Ist die Untergruppe der nicht " +"übereinstimmenden Ausnahmen nicht leer, wird sie von der nächsten Klausel " +":keyword:`!except*` auf dieselbe Weise verarbeitet. Dies wird so lange " +"fortgesetzt, bis alle Ausnahmen in der Gruppe abgeglichen wurden oder die " +"letzte Klausel :keyword:`!except*` ausgeführt wurde." msgid "" "After all :keyword:`!except*` clauses execute, the group of unhandled " "exceptions is merged with any exceptions that were raised or re-raised from " "within :keyword:`!except*` clauses. This merged exception group propagates " -"on.::" +"on::" msgstr "" +"Nachdem alle :keyword:`!except*` -Klauseln ausgeführt wurden, wird die " +"Gruppe der nicht behandelten Ausnahmen mit allen Ausnahmen zusammengeführt, " +"die innerhalb von :keyword:`!except*` -Klauseln ausgelöst oder erneut " +"ausgelöst wurden. Diese zusammengeführte Ausnahmegruppe wird weitergegeben " +"an::" msgid "" ">>> try:\n" @@ -354,9 +533,15 @@ msgid "" "If the exception raised from the :keyword:`try` block is not an exception " "group and its type matches one of the :keyword:`!except*` clauses, it is " "caught and wrapped by an exception group with an empty message string. This " -"ensures that the type of the target ``e`` is consistently :exc:" -"`BaseExceptionGroup`::" +"ensures that the type of the target ``e`` is consistently " +":exc:`BaseExceptionGroup`::" msgstr "" +"Wenn die im Block :keyword:`try` ausgelöste Ausnahme keine " +"Ausnahmegruppe ist und ihr Typ mit einer der Klauseln :keyword:`!except*` " +"; übereinstimmt, wird sie abgefangen und von einer Ausnahmegruppe mit einer " +"leeren Meldungszeichenfolge umschlossen. Dadurch wird sichergestellt, dass " +"der Typ des Ziels ``e`` durchgehend :exc:`BaseExceptionGroup` lautet" +" ::" msgid "" ">>> try:\n" @@ -364,40 +549,61 @@ msgid "" "... except* BlockingIOError as e:\n" "... print(repr(e))\n" "...\n" -"ExceptionGroup('', (BlockingIOError()))" +"ExceptionGroup('', (BlockingIOError(),))" msgstr "" msgid "" -":keyword:`break`, :keyword:`continue` and :keyword:`return` cannot appear in " -"an :keyword:`!except*` clause." +":keyword:`break`, :keyword:`continue` and :keyword:`return` cannot appear in" +" an :keyword:`!except*` clause." msgstr "" +":keyword:`break`, :keyword:`continue` und :keyword:`return` dürfen " +"nicht in einer :keyword:`!except*` -Klausel vorkommen." msgid ":keyword:`!else` clause" -msgstr "" +msgstr ":keyword:`!else` Klausel" msgid "" "The optional :keyword:`!else` clause is executed if the control flow leaves " -"the :keyword:`try` suite, no exception was raised, and no :keyword:" -"`return`, :keyword:`continue`, or :keyword:`break` statement was executed. " -"Exceptions in the :keyword:`!else` clause are not handled by the preceding :" -"keyword:`except` clauses." -msgstr "" +"the :keyword:`try` suite, no exception was raised, and no :keyword:`return`," +" :keyword:`continue`, or :keyword:`break` statement was executed. " +"Exceptions in the :keyword:`!else` clause are not handled by the preceding " +":keyword:`except` clauses." +msgstr "" +"Die optionale Klausel :keyword:`!else` wird ausgeführt, wenn der " +"Kontrollfluss die Suite :keyword:`try` verlässt, keine Ausnahme " +"ausgelöst wurde und keine Anweisung vom Typ :keyword:`return`, " +":keyword:`continue` oder :keyword:`break` ausgeführt wurde. Ausnahmen " +"in der Klausel :keyword:`!else` werden von den vorangehenden Klauseln " +":keyword:`except` nicht behandelt." msgid ":keyword:`!finally` clause" -msgstr "" - -msgid "" -"If :keyword:`!finally` is present, it specifies a 'cleanup' handler. The :" -"keyword:`try` clause is executed, including any :keyword:`except` and :" -"keyword:`else ` clauses. If an exception occurs in any of the " -"clauses and is not handled, the exception is temporarily saved. The :keyword:" -"`!finally` clause is executed. If there is a saved exception it is re-" -"raised at the end of the :keyword:`!finally` clause. If the :keyword:`!" -"finally` clause raises another exception, the saved exception is set as the " -"context of the new exception. If the :keyword:`!finally` clause executes a :" -"keyword:`return`, :keyword:`break` or :keyword:`continue` statement, the " -"saved exception is discarded. For example, this function returns 42." -msgstr "" +msgstr ":keyword:`!finally` Klausel" + +msgid "" +"If :keyword:`!finally` is present, it specifies a 'cleanup' handler. The " +":keyword:`try` clause is executed, including any :keyword:`except` and " +":keyword:`else ` clauses. If an exception occurs in any of the " +"clauses and is not handled, the exception is temporarily saved. The " +":keyword:`!finally` clause is executed. If there is a saved exception it is" +" re-raised at the end of the :keyword:`!finally` clause. If the " +":keyword:`!finally` clause raises another exception, the saved exception is " +"set as the context of the new exception. If the :keyword:`!finally` clause " +"executes a :keyword:`return`, :keyword:`break` or :keyword:`continue` " +"statement, the saved exception is discarded. For example, this function " +"returns 42." +msgstr "" +"Wenn :keyword:`!finally` vorhanden ist, wird damit ein \"Cleanup\"-Handler" +" angegeben. Die Klausel :keyword:`try` wird ausgeführt, einschließlich " +"aller :keyword:`except` - und :keyword:`else ` -Klauseln. " +"Tritt in einer der Klauseln eine Ausnahme auf, die nicht abgefangen wird, " +"wird diese vorübergehend gespeichert. Die Klausel :keyword:`!finally` " +"wird ausgeführt. Liegt eine gespeicherte Ausnahme vor, wird diese am Ende " +"der Klausel :keyword:`!finally` erneut ausgelöst. Löst die Klausel " +":keyword:`!finally` eine weitere Ausnahme aus, wird die gespeicherte " +"Ausnahme als Kontext der neuen Ausnahme festgelegt. Führt die Klausel " +":keyword:`!finally` eine Anweisung :keyword:`return``, " +":keyword:`break` oder :keyword:`continue` aus, wird die gespeicherte " +"Ausnahme verworfen. Diese Funktion gibt beispielsweise 42 zurück." msgid "" "def f():\n" @@ -411,21 +617,33 @@ msgid "" "The exception information is not available to the program during execution " "of the :keyword:`!finally` clause." msgstr "" +"Die Ausnahmedaten stehen dem Programm während der Ausführung der Anweisung " +" :keyword:`!finally` nicht zur Verfügung." msgid "" "When a :keyword:`return`, :keyword:`break` or :keyword:`continue` statement " -"is executed in the :keyword:`try` suite of a :keyword:`!try`...\\ :keyword:`!" -"finally` statement, the :keyword:`!finally` clause is also executed 'on the " -"way out.'" +"is executed in the :keyword:`try` suite of a :keyword:`!try`...\\ " +":keyword:`!finally` statement, the :keyword:`!finally` clause is also " +"executed 'on the way out.'" msgstr "" +"Wenn eine Anweisung vom Typ :keyword:`return`, :keyword:`break` oder" +" :keyword:`continue` innerhalb der :keyword:`try` -Suite einer " +"Anweisung vom Typ :keyword:`!try`...\\ :keyword:`!finally` ausgeführt " +"wird, wird die :keyword:`!finally` -Klausel ebenfalls \"beim Verlassen\"; " +"ausgeführt." msgid "" "The return value of a function is determined by the last :keyword:`return` " -"statement executed. Since the :keyword:`!finally` clause always executes, " -"a :keyword:`!return` statement executed in the :keyword:`!finally` clause " +"statement executed. Since the :keyword:`!finally` clause always executes, a" +" :keyword:`!return` statement executed in the :keyword:`!finally` clause " "will always be the last one executed. The following function returns " "'finally'." msgstr "" +"Der Rückgabewert einer Funktion wird durch die zuletzt ausgeführte " +":keyword:`return` -Anweisung bestimmt. Da die :keyword:`!finally` " +"-Klausel immer ausgeführt wird, ist eine in der :keyword:`!finally` " +"-Klausel ausgeführte :keyword:`!return` -Anweisung immer die zuletzt " +"ausgeführte. Die folgende Funktion gibt \"finally\"; zurück." msgid "" "def foo():\n" @@ -436,84 +654,121 @@ msgid "" msgstr "" msgid "" -"Prior to Python 3.8, a :keyword:`continue` statement was illegal in the :" -"keyword:`!finally` clause due to a problem with the implementation." +"Prior to Python 3.8, a :keyword:`continue` statement was illegal in the " +":keyword:`!finally` clause due to a problem with the implementation." msgstr "" +"Vor Python 3.8 war eine Anweisung vom Typ :keyword:`continue` in der " +"Klausel :keyword:`!finally` aufgrund eines Problems bei der " +"Implementierung unzulässig." msgid "" -"The compiler emits a :exc:`SyntaxWarning` when a :keyword:`return`, :keyword:" -"`break` or :keyword:`continue` appears in a :keyword:`!finally` block (see :" -"pep:`765`)." +"The compiler emits a :exc:`SyntaxWarning` when a :keyword:`return`, " +":keyword:`break` or :keyword:`continue` appears in a :keyword:`!finally` " +"block (see :pep:`765`)." msgstr "" +"Der Compiler gibt die Fehlermeldung :exc:`SyntaxWarning` aus, wenn " +":keyword:`return`, :keyword:`break` oder :keyword:`continue` in " +"einem :keyword:`!finally` -Block vorkommt (siehe :pep:`765`)." msgid "The :keyword:`!with` statement" -msgstr "" +msgstr "Die Erklärung von :keyword:`!with` ." msgid "" "The :keyword:`with` statement is used to wrap the execution of a block with " "methods defined by a context manager (see section :ref:`context-managers`). " -"This allows common :keyword:`try`...\\ :keyword:`except`...\\ :keyword:" -"`finally` usage patterns to be encapsulated for convenient reuse." +"This allows common :keyword:`try`...\\ :keyword:`except`...\\ " +":keyword:`finally` usage patterns to be encapsulated for convenient reuse." msgstr "" +"Die Anweisung :keyword:`with` dient dazu, die Ausführung eines Blocks " +"mit Methoden zu umschließen, die von einem Kontextmanager definiert wurden " +"(siehe Abschnitt :ref:`context-managers`). Dadurch lassen sich gängige " +"Verwendungsmuster wie :keyword:`try`...\\ :keyword:`except`...\\ " +":keyword:`finally` zur bequemen Wiederverwendung kapseln." msgid "" -"The execution of the :keyword:`with` statement with one \"item\" proceeds as " -"follows:" +"The execution of the :keyword:`with` statement with one \"item\" proceeds as" +" follows:" msgstr "" +"Die Ausführung der Anweisung :keyword:`with` mit einem \"Element\"; " +"verläuft wie folgt:" msgid "" -"The context expression (the expression given in the :token:`~python-grammar:" -"with_item`) is evaluated to obtain a context manager." +"The context expression (the expression given in the :token:`~python-" +"grammar:with_item`) is evaluated to obtain a context manager." msgstr "" +"Der Kontextausdruck (der in der Datei :token:`~python-grammar:with_item` " +" angegebene Ausdruck) wird ausgewertet, um einen Kontextmanager zu erhalten." msgid "" "The context manager's :meth:`~object.__enter__` is loaded for later use." msgstr "" +"Die :meth:`~object.__enter__` des Kontextmanagers wird zur späteren " +"Verwendung geladen." -msgid "The context manager's :meth:`~object.__exit__` is loaded for later use." +msgid "" +"The context manager's :meth:`~object.__exit__` is loaded for later use." msgstr "" +"Die :meth:`~object.__exit__` des Kontextmanagers wird für die spätere " +"Verwendung geladen." msgid "The context manager's :meth:`~object.__enter__` method is invoked." msgstr "" +"Die Methode :meth:`~object.__enter__` des Kontextmanagers wird " +"aufgerufen." msgid "" "If a target was included in the :keyword:`with` statement, the return value " "from :meth:`~object.__enter__` is assigned to it." msgstr "" +"Wenn in der Anweisung :keyword:`with` ein Ziel angegeben wurde, wird ihm" +" der Rückgabewert von :meth:`~object.__enter__` zugewiesen." msgid "" -"The :keyword:`with` statement guarantees that if the :meth:`~object." -"__enter__` method returns without an error, then :meth:`~object.__exit__` " -"will always be called. Thus, if an error occurs during the assignment to the " -"target list, it will be treated the same as an error occurring within the " -"suite would be. See step 7 below." +"The :keyword:`with` statement guarantees that if the " +":meth:`~object.__enter__` method returns without an error, then " +":meth:`~object.__exit__` will always be called. Thus, if an error occurs " +"during the assignment to the target list, it will be treated the same as an " +"error occurring within the suite would be. See step 7 below." msgstr "" msgid "The suite is executed." -msgstr "" +msgstr "Die Suite wurde aufgeführt." msgid "" "The context manager's :meth:`~object.__exit__` method is invoked. If an " "exception caused the suite to be exited, its type, value, and traceback are " -"passed as arguments to :meth:`~object.__exit__`. Otherwise, three :const:" -"`None` arguments are supplied." +"passed as arguments to :meth:`~object.__exit__`. Otherwise, three " +":const:`None` arguments are supplied." msgstr "" +"Die Methode :meth:`~object.__exit__` des Kontextmanagers wird " +"aufgerufen. Wenn eine Ausnahme zum Abbruch der Suite geführt hat, werden " +"deren Typ, Wert und Traceback als Argumente an :meth:`~object.__exit__`` " +"übergeben. Andernfalls werden drei Argumente vom Typ :const:`None` " +"übergeben." msgid "" -"If the suite was exited due to an exception, and the return value from the :" -"meth:`~object.__exit__` method was false, the exception is reraised. If the " -"return value was true, the exception is suppressed, and execution continues " -"with the statement following the :keyword:`with` statement." +"If the suite was exited due to an exception, and the return value from the " +":meth:`~object.__exit__` method was false, the exception is reraised. If " +"the return value was true, the exception is suppressed, and execution " +"continues with the statement following the :keyword:`with` statement." msgstr "" +"Wurde die Suite aufgrund einer Ausnahme beendet und war der Rückgabewert der" +" Methode :meth:`~object.__exit__` `false`, wird die Ausnahme erneut " +"ausgelöst. War der Rückgabewert `true`, wird die Ausnahme unterdrückt, und " +"die Ausführung wird mit der Anweisung fortgesetzt, die auf die Anweisung " +":keyword:`with` folgt." msgid "" "If the suite was exited for any reason other than an exception, the return " "value from :meth:`~object.__exit__` is ignored, and execution proceeds at " "the normal location for the kind of exit that was taken." msgstr "" +"Wurde die Suite aus einem anderen Grund als einer Ausnahme beendet, wird der" +" Rückgabewert von :meth:`~object.__exit__` ignoriert, und die Ausführung" +" wird an der für die jeweilige Beendigungsart üblichen Stelle fortgesetzt." msgid "The following code::" -msgstr "" +msgstr "Der folgende Code::" msgid "" "with EXPRESSION as TARGET:\n" @@ -521,13 +776,13 @@ msgid "" msgstr "" msgid "is semantically equivalent to::" -msgstr "" +msgstr "ist semantisch gleichbedeutend mit::" msgid "" "manager = (EXPRESSION)\n" -"enter = type(manager).__enter__\n" -"exit = type(manager).__exit__\n" -"value = enter(manager)\n" +"enter = manager.__enter__\n" +"exit = manager.__exit__\n" +"value = enter()\n" "hit_except = False\n" "\n" "try:\n" @@ -535,17 +790,27 @@ msgid "" " SUITE\n" "except:\n" " hit_except = True\n" -" if not exit(manager, *sys.exc_info()):\n" +" if not exit(*sys.exc_info()):\n" " raise\n" "finally:\n" " if not hit_except:\n" -" exit(manager, None, None, None)" +" exit(None, None, None)" +msgstr "" + +msgid "" +"except that implicit :ref:`special method lookup ` is used " +"for :meth:`~object.__enter__` and :meth:`~object.__exit__`." msgstr "" +"mit der Ausnahme, dass für :meth:`~object.__enter__` und " +":meth:`~object.__exit__` die implizite :ref:`Spezialmethoden-Suche ` verwendet wird." msgid "" -"With more than one item, the context managers are processed as if multiple :" -"keyword:`with` statements were nested::" +"With more than one item, the context managers are processed as if multiple " +":keyword:`with` statements were nested::" msgstr "" +"Bei mehr als einem Element werden die Kontextmanager so verarbeitet, als " +"wären mehrere :keyword:`with` -Anweisungen verschachtelt::" msgid "" "with A() as a, B() as b:\n" @@ -562,6 +827,8 @@ msgid "" "You can also write multi-item context managers in multiple lines if the " "items are surrounded by parentheses. For example::" msgstr "" +"Sie können Kontextmanager mit mehreren Elementen auch über mehrere Zeilen " +"hinweg schreiben, wenn die Elemente in Klammern stehen. Zum Beispiel::" msgid "" "with (\n" @@ -572,67 +839,87 @@ msgid "" msgstr "" msgid "Support for multiple context expressions." -msgstr "" +msgstr "Unterstützung für mehrere Kontext-Ausdrücke." msgid "" "Support for using grouping parentheses to break the statement in multiple " "lines." msgstr "" +"Unterstützung für die Verwendung von Gruppierungsklammern, um die Anweisung " +"auf mehrere Zeilen aufzuteilen." msgid ":pep:`343` - The \"with\" statement" -msgstr "" +msgstr ":pep:`343` - Die \"with\"-Anweisung" msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" +"Die Spezifikation, Hintergrundinformationen und Beispiele zur Python-" +"Anweisung :keyword:`with` ." msgid "The :keyword:`!match` statement" -msgstr "" +msgstr "Die Erklärung der :keyword:`!match` " msgid "The match statement is used for pattern matching. Syntax:" -msgstr "" +msgstr "Die \"match\"-Anweisung dient zum Musterabgleich. Syntax:" msgid "" "This section uses single quotes to denote :ref:`soft keywords `." msgstr "" +"In diesem Abschnitt werden einfache Anführungszeichen verwendet, um " +":ref:`Soft-Schlüsselwörter `` zu kennzeichnen." msgid "" -"Pattern matching takes a pattern as input (following ``case``) and a subject " -"value (following ``match``). The pattern (which may contain subpatterns) is " -"matched against the subject value. The outcomes are:" +"Pattern matching takes a pattern as input (following ``case``) and a subject" +" value (following ``match``). The pattern (which may contain subpatterns) " +"is matched against the subject value. The outcomes are:" msgstr "" +"Beim Musterabgleich werden ein Muster als Eingabe (gemäß ``case``) und ein " +"Zielwert (gemäß ``match``) verwendet. Das Muster (das Untermuster enthalten " +"kann) wird mit dem Zielwert abgeglichen. Die möglichen Ergebnisse sind:" msgid "A match success or failure (also termed a pattern success or failure)." msgstr "" +"Ein Übereinstimmungserfolg oder -misserfolg (auch als Mustererfolg oder " +"-misserfolg bezeichnet)." msgid "" "Possible binding of matched values to a name. The prerequisites for this " "are further discussed below." msgstr "" +"Mögliche Zuordnung übereinstimmender Werte zu einem Namen. Die " +"Voraussetzungen hierfür werden im Folgenden näher erläutert." msgid "" -"The ``match`` and ``case`` keywords are :ref:`soft keywords `." +"The ``match`` and ``case`` keywords are :ref:`soft keywords `." msgstr "" +"Die Schlüsselwörter ``match`` und ``case`` sind :ref:`Soft-" +"Schlüsselwörter `." msgid ":pep:`634` -- Structural Pattern Matching: Specification" -msgstr "" +msgstr ":pep:`634` -- Struktureller Musterabgleich: Spezifikation" msgid ":pep:`636` -- Structural Pattern Matching: Tutorial" -msgstr "" +msgstr ":pep:`636` -- Struktureller Musterabgleich: Tutorial" msgid "Overview" -msgstr "" +msgstr "Übersicht" msgid "Here's an overview of the logical flow of a match statement:" msgstr "" +"Hier ist ein Überblick über den logischen Ablauf einer \"match\"-Anweisung:" msgid "" -"The subject expression ``subject_expr`` is evaluated and a resulting subject " -"value obtained. If the subject expression contains a comma, a tuple is " +"The subject expression ``subject_expr`` is evaluated and a resulting subject" +" value obtained. If the subject expression contains a comma, a tuple is " "constructed using :ref:`the standard rules `." msgstr "" +"Der Subjekt-Ausdruck ``subject_expr`` wird ausgewertet und der resultierende" +" Subjektwert ermittelt. Enthält der Subjekt-Ausdruck ein Komma, wird ein " +"Tupel gemäß :ref:`den Standardregeln ` gebildet." msgid "" "Each pattern in a ``case_block`` is attempted to match with the subject " @@ -642,39 +929,67 @@ msgid "" "specified below. **Name bindings made during a successful pattern match " "outlive the executed block and can be used after the match statement**." msgstr "" +"Jedes Muster in einem ``case_block`` wird mit dem entsprechenden Wert " +"abgeglichen. Die konkreten Regeln für Erfolg oder Misserfolg werden im " +"Folgenden beschrieben. Der Abgleichversuch kann auch einige oder alle " +"eigenständigen Namen innerhalb des Musters binden. Die genauen Regeln für " +"die Musterbindung variieren je nach Mustertyp und werden im Folgenden näher " +"erläutert. **Namensbindungen, die während eines erfolgreichen " +"Musterabgleichs vorgenommen werden, bestehen über den ausgeführten Block " +"hinaus fort und können nach der `match`-Anweisung verwendet werden**." msgid "" -"During failed pattern matches, some subpatterns may succeed. Do not rely on " -"bindings being made for a failed match. Conversely, do not rely on " +"During failed pattern matches, some subpatterns may succeed. Do not rely on" +" bindings being made for a failed match. Conversely, do not rely on " "variables remaining unchanged after a failed match. The exact behavior is " "dependent on implementation and may vary. This is an intentional decision " "made to allow different implementations to add optimizations." msgstr "" +"Bei fehlgeschlagenen Musterabgleichen können einige Teilmuster erfolgreich " +"sein. Verlassen Sie sich nicht darauf, dass bei einem fehlgeschlagenen " +"Abgleich Bindungen hergestellt werden. Verlassen Sie sich umgekehrt auch " +"nicht darauf, dass Variablen nach einem fehlgeschlagenen Abgleich " +"unverändert bleiben. Das genaue Verhalten hängt von der Implementierung ab " +"und kann variieren. Dies ist eine bewusste Entscheidung, die getroffen " +"wurde, um verschiedenen Implementierungen die Möglichkeit zu geben, " +"Optimierungen hinzuzufügen." msgid "" "If the pattern succeeds, the corresponding guard (if present) is evaluated. " "In this case all name bindings are guaranteed to have happened." msgstr "" +"Wenn das Muster erfolgreich ist, wird die entsprechende Bedingung (sofern " +"vorhanden) ausgewertet. In diesem Fall ist gewährleistet, dass alle " +"Namenszuordnungen bereits erfolgt sind." msgid "" "If the guard evaluates as true or is missing, the ``block`` inside " "``case_block`` is executed." msgstr "" +"Wenn die Bedingung wahr ist oder fehlt, wird die Anweisung ``block`` " +"innerhalb von ``case_block`` ausgeführt." msgid "Otherwise, the next ``case_block`` is attempted as described above." msgstr "" +"Andernfalls wird, wie oben beschrieben, der nächste ``case_block`` versucht." msgid "If there are no further case blocks, the match statement is completed." msgstr "" +"Wenn keine weiteren Fallblöcke mehr vorhanden sind, ist die " + \"match\"-Anweisung abgeschlossen." msgid "" "Users should generally never rely on a pattern being evaluated. Depending " "on implementation, the interpreter may cache values or use other " "optimizations which skip repeated evaluations." msgstr "" +"Benutzer sollten sich grundsätzlich nie darauf verlassen, dass ein Muster " +"ausgewertet wird. Je nach Implementierung speichert der Interpreter Werte " +"möglicherweise im Cache oder nutzt andere Optimierungen, durch die " +"wiederholte Auswertungen übersprungen werden." msgid "A sample match statement::" -msgstr "" +msgstr "Ein Beispiel für eine Abgleichsanweisung::" msgid "" ">>> flag = False\n" @@ -690,46 +1005,75 @@ msgid "" "...\n" "Case 3, y: 200" msgstr "" +">>> flag = False\n" +">>> match (100, 200):\n" +"... case (100, 300): # Keine Übereinstimmung: 200 ≠ 300\n" +"... print('Fall 1')\n" +"... case (100, 200) if flag: # Übereinstimmung erfolgreich, aber Bedingung nicht erfüllt\n" +"... print('Fall 2')\n" +"... case (100, y): # Übereinstimmung und y wird auf 200 gesetzt\n" +"... print(f'Fall 3, y: {y}')\n" +"... case _: # Muster wird nicht versucht\n" +"... print('Fall 4, ich passe auf alles!')\n" +"...\n" +"Fall 3, y: 200" msgid "" "In this case, ``if flag`` is a guard. Read more about that in the next " "section." msgstr "" +"In diesem Fall ist ``if flag`` ein Guard. Mehr dazu erfahren Sie im " +"nächsten Abschnitt." msgid "Guards" -msgstr "" +msgstr "Guards" msgid "" -"A ``guard`` (which is part of the ``case``) must succeed for code inside the " -"``case`` block to execute. It takes the form: :keyword:`if` followed by an " -"expression." +"A ``guard`` (which is part of the ``case``) must succeed for code inside the" +" ``case`` block to execute. It takes the form: :keyword:`if` followed by an" +" expression." msgstr "" +"Ein ``guard`` (der Teil des ``case`` ist) muss erfolgreich sein, " +"damit der Code innerhalb des ``case`` -Blocks ausgeführt wird. Er hat " +"folgende Form: :keyword:`if`, gefolgt von einem Ausdruck." msgid "The logical flow of a ``case`` block with a ``guard`` follows:" msgstr "" +"Der logische Ablauf eines ``case`` -Blocks mit einem ``guard`` sieht " +"wie folgt aus:" msgid "" "Check that the pattern in the ``case`` block succeeded. If the pattern " "failed, the ``guard`` is not evaluated and the next ``case`` block is " "checked." msgstr "" +"Überprüfen Sie, ob die Musterprüfung im Block ``case`` erfolgreich war. " +"Falls die Musterprüfung fehlgeschlagen ist, wird der Block ``guard`` " +"nicht ausgewertet und der nächste Block ``case`` geprüft." msgid "If the pattern succeeded, evaluate the ``guard``." msgstr "" +"Wenn die Mustererkennung erfolgreich war, werte die ``guard`` aus." msgid "" "If the ``guard`` condition evaluates as true, the case block is selected." msgstr "" +"Wenn die Bedingung ``guard`` als wahr ausgewertet wird, wird der " + \"case\"-Block ausgewählt." msgid "" "If the ``guard`` condition evaluates as false, the case block is not " "selected." msgstr "" +"Wenn die Bedingung ``guard`` als \"falsch\"; ausgewertet wird, wird der " + \"case\"-Block nicht ausgewählt." msgid "" "If the ``guard`` raises an exception during evaluation, the exception " "bubbles up." msgstr "" +"Wenn die ``guard`` während der Auswertung eine Ausnahme auslöst, wird " +"diese nach oben weitergeleitet." msgid "" "Guards are allowed to have side effects as they are expressions. Guard " @@ -738,51 +1082,70 @@ msgid "" "evaluation must happen in order.) Guard evaluation must stop once a case " "block is selected." msgstr "" +"Guards dürfen Nebenwirkungen haben, da es sich um Ausdrücke handelt. Die " +"Auswertung der Guards muss vom ersten bis zum letzten Case-Block " +"nacheinander erfolgen, wobei Case-Blöcke übersprungen werden, deren Muster " +"nicht alle erfolgreich sind. (Das heißt, die Auswertung der Guards muss in " +"der richtigen Reihenfolge erfolgen.) Die Auswertung der Guards muss beendet " +"werden, sobald ein Case-Block ausgewählt wurde." msgid "Irrefutable Case Blocks" -msgstr "" +msgstr "Unwiderlegbare Argumente" msgid "" "An irrefutable case block is a match-all case block. A match statement may " "have at most one irrefutable case block, and it must be last." msgstr "" +"Ein unwiderlegbarer Fallblock ist ein Fallblock, der alle Fälle abdeckt. " +"Eine `match`-Anweisung darf höchstens einen unwiderlegbaren Fallblock " +"enthalten, und dieser muss an letzter Stelle stehen." msgid "" -"A case block is considered irrefutable if it has no guard and its pattern is " -"irrefutable. A pattern is considered irrefutable if we can prove from its " +"A case block is considered irrefutable if it has no guard and its pattern is" +" irrefutable. A pattern is considered irrefutable if we can prove from its " "syntax alone that it will always succeed. Only the following patterns are " "irrefutable:" msgstr "" +"Ein Fallblock gilt als unwiderlegbar, wenn er keine Schutzklausel enthält " +"und sein Muster unwiderlegbar ist. Ein Muster gilt als unwiderlegbar, wenn " +"sich allein anhand seiner Syntax nachweisen lässt, dass es immer erfolgreich" +" ist. Nur die folgenden Muster sind unwiderlegbar:" msgid ":ref:`as-patterns` whose left-hand side is irrefutable" -msgstr "" +msgstr ":ref:`as-patterns` dessen linke Seite unwiderlegbar ist" msgid ":ref:`or-patterns` containing at least one irrefutable pattern" -msgstr "" +msgstr ":ref:`or-patterns` das mindestens ein unwiderlegbares Muster enthält" msgid ":ref:`capture-patterns`" -msgstr "" +msgstr ":ref:`capture-patterns`" msgid ":ref:`wildcard-patterns`" -msgstr "" +msgstr ":ref:`wildcard-patterns`" msgid "parenthesized irrefutable patterns" -msgstr "" +msgstr "in Klammern gesetzte, unwiderlegbare Muster" msgid "Patterns" -msgstr "" +msgstr "Muster" msgid "This section uses grammar notations beyond standard EBNF:" msgstr "" +"In diesem Abschnitt werden Grammatiknotationen verwendet, die über die " +"Standard-EBNF hinausgehen:" msgid "the notation ``SEP.RULE+`` is shorthand for ``RULE (SEP RULE)*``" msgstr "" +"Die Schreibweise ``SEP.RULE+`` ist eine Kurzschreibweise für ``RULE (SEP" +" RULE)*``" msgid "the notation ``!RULE`` is shorthand for a negative lookahead assertion" msgstr "" +"Die Schreibweise ``!RULE`` ist eine Kurzform für eine negative " +"Lookahead-Bedingung." msgid "The top-level syntax for ``patterns`` is:" -msgstr "" +msgstr "Die übergeordnete Syntax für ``patterns`` lautet:" msgid "" "The descriptions below will include a description \"in simple terms\" of " @@ -792,94 +1155,142 @@ msgid "" "the underlying implementation. Furthermore, they do not cover all valid " "forms." msgstr "" +"Die folgenden Beschreibungen enthalten zur Veranschaulichung eine \"einfach " +"formulierte\"; Erläuterung der Funktionsweise eines Musters (Dank gilt Raymond" +" Hettinger für ein Dokument, das als Vorlage für die meisten dieser " +"Beschreibungen diente). Bitte beachten Sie, dass diese Beschreibungen rein " +"zur Veranschaulichung dienen und **möglicherweise nicht** die zugrunde " +"liegende Implementierung widerspiegeln. Außerdem decken sie nicht alle " +"gültigen Formen ab." msgid "OR Patterns" -msgstr "" +msgstr "ODER (\"Oder\") Muster" msgid "" "An OR pattern is two or more patterns separated by vertical bars ``|``. " "Syntax:" msgstr "" +"Ein OR-Muster besteht aus zwei oder mehr Mustern, die durch senkrechte " +"Striche getrennt sind: ``|``. Syntax:" msgid "" "Only the final subpattern may be :ref:`irrefutable `, and " "each subpattern must bind the same set of names to avoid ambiguity." msgstr "" +"Nur das letzte Teilmuster darf :ref:`irrefutable ` sein, " +"und jedes Teilmuster muss dieselbe Menge von Namen binden, um " +"Mehrdeutigkeiten zu vermeiden." msgid "" "An OR pattern matches each of its subpatterns in turn to the subject value, " "until one succeeds. The OR pattern is then considered successful. " "Otherwise, if none of the subpatterns succeed, the OR pattern fails." msgstr "" +"Ein OR-Muster gleicht nacheinander jedes seiner Teilmuster mit dem Suchwert " +"ab, bis eines davon übereinstimmt. Das OR-Muster gilt dann als erfolgreich. " +"Andernfalls, wenn keines der Teilmuster übereinstimmt, schlägt das OR-Muster" +" fehl." msgid "" "In simple terms, ``P1 | P2 | ...`` will try to match ``P1``, if it fails it " "will try to match ``P2``, succeeding immediately if any succeeds, failing " "otherwise." msgstr "" +"Einfach ausgedrückt: ``P1 | P2 | ...`` versucht zunächst, ``P1`` " +"abzugleichen; sollte dies fehlschlagen, wird ``P2`` versucht. Sobald " +"einer der Versuche erfolgreich ist, ist der Vorgang abgeschlossen; " +"andernfalls schlägt er fehl." msgid "AS Patterns" -msgstr "" +msgstr "AS-Muster" msgid "" -"An AS pattern matches an OR pattern on the left of the :keyword:`as` keyword " -"against a subject. Syntax:" +"An AS pattern matches an OR pattern on the left of the :keyword:`as` keyword" +" against a subject. Syntax:" msgstr "" +"Ein \"AS\"-Muster gleicht ein \"OR\"-Muster links vom Schlüsselwort " +":keyword:`as` mit einem Subjekt ab. Syntax:" msgid "" "If the OR pattern fails, the AS pattern fails. Otherwise, the AS pattern " "binds the subject to the name on the right of the as keyword and succeeds. " "``capture_pattern`` cannot be a ``_``." msgstr "" +"Wenn das OR-Muster fehlschlägt, schlägt auch das AS-Muster fehl. Andernfalls" +" bindet das AS-Muster das Subjekt an den Namen rechts vom Schlüsselwort \"as\"." +" und ist erfolgreich. ``capture_pattern`` darf kein ``_`` sein." msgid "" "In simple terms ``P as NAME`` will match with ``P``, and on success it will " "set ``NAME = ``." msgstr "" +"Einfach ausgedrückt: ``P as NAME`` wird mit ``P`` abgeglichen, und " +"bei Erfolg wird ``NAME = `` gesetzt." msgid "Literal Patterns" -msgstr "" +msgstr "Literale Muster" msgid "" -"A literal pattern corresponds to most :ref:`literals ` in Python. " -"Syntax:" +"A literal pattern corresponds to most :ref:`literals ` in Python." +" Syntax:" msgstr "" +"Ein Literalmuster entspricht den meisten :ref:`Literalen ` in " +"Python. Syntax:" msgid "" -"The rule ``strings`` and the token ``NUMBER`` are defined in the :doc:" -"`standard Python grammar <./grammar>`. Triple-quoted strings are " +"The rule ``strings`` and the token ``NUMBER`` are defined in the " +":doc:`standard Python grammar <./grammar>`. Triple-quoted strings are " "supported. Raw strings and byte strings are supported. :ref:`f-strings` " "and :ref:`t-strings` are not supported." msgstr "" +"Die Regel ``strings`` und das Token ``NUMBER`` sind in der :doc:`Standard-" +"Python-Grammatik <./grammar>` definiert. Dreifach in Anführungszeichen " +"gesetzte Zeichenketten werden unterstützt. Raw-Strings und Byte-Strings " +"werden unterstützt. :ref:`f-strings` und :ref:`t-strings` werden nicht " +"unterstützt." msgid "" "The forms ``signed_number '+' NUMBER`` and ``signed_number '-' NUMBER`` are " "for expressing :ref:`complex numbers `; they require a real " "number on the left and an imaginary number on the right. E.g. ``3 + 4j``." msgstr "" +"Die Formate ``signed_number '+' NUMBER`` und ``signed_number '-' NUMBER`` " +"dienen zur Darstellung von :ref:`komplexen Zahlen `; sie " +"erfordern links eine reelle Zahl und rechts eine imaginäre Zahl. Beispiel: " +"``3 + 4j``." msgid "" "In simple terms, ``LITERAL`` will succeed only if `` == LITERAL``. " "For the singletons ``None``, ``True`` and ``False``, the :keyword:`is` " "operator is used." msgstr "" +"Einfach ausgedrückt: ``LITERAL`` ist nur dann erfolgreich, wenn " +"`` == LITERAL`` . Für die Singletons ``None``, ``True`` " +"und ``False`` wird der Operator :keyword:`is` verwendet." msgid "Capture Patterns" -msgstr "" +msgstr "Erfassungsmuster / Capture-Muster" msgid "A capture pattern binds the subject value to a name. Syntax:" msgstr "" +"Ein Capture-Muster ordnet den Wert des Subjekts einem Namen zu. Syntax:" msgid "" "A single underscore ``_`` is not a capture pattern (this is what ``!'_'`` " -"expresses). It is instead treated as a :token:`~python-grammar:" -"wildcard_pattern`." +"expresses). It is instead treated as a :token:`~python-" +"grammar:wildcard_pattern`." msgstr "" +"Ein einzelner Unterstrich ``_`` ist kein Capture-Muster (dies wird durch" +" ``!'_'`` ausgedrückt). Er wird stattdessen als :token:`~python-" +"grammar:wildcard_pattern` behandelt." msgid "" -"In a given pattern, a given name can only be bound once. E.g. ``case x, " -"x: ...`` is invalid while ``case [x] | x: ...`` is allowed." +"In a given pattern, a given name can only be bound once. E.g. ``case x, x: " +"...`` is invalid while ``case [x] | x: ...`` is allowed." msgstr "" +"In einem bestimmten Muster kann ein bestimmter Name nur einmal verwendet " +"werden. Beispielsweise ist ``case x, x: ...`` ungültig, während ``case" +" [x] | x: ...`` zulässig ist." msgid "" "Capture patterns always succeed. The binding follows scoping rules " @@ -887,45 +1298,65 @@ msgid "" "becomes a local variable in the closest containing function scope unless " "there's an applicable :keyword:`global` or :keyword:`nonlocal` statement." msgstr "" +"Capture-Muster sind immer erfolgreich. Die Bindung folgt den Regeln für den " +"Gültigkeitsbereich, die durch den Zuweisungsausdrucksoperator in :pep:`572` " +"festgelegt sind; der Name wird zu einer lokalen Variablen im nächstgelegenen" +" übergeordneten Funktionsgültigkeitsbereich, sofern keine entsprechende " +"Anweisung vom Typ :keyword:`global` oder :keyword:`nonlocal` vorliegt." msgid "" "In simple terms ``NAME`` will always succeed and it will set ``NAME = " "``." msgstr "" +"Einfach ausgedrückt: ``NAME`` wird immer erfolgreich sein und ``NAME =" +" `` setzen." msgid "Wildcard Patterns" -msgstr "" +msgstr "Platzhaltermuster" msgid "" "A wildcard pattern always succeeds (matches anything) and binds no name. " "Syntax:" msgstr "" +"Ein Platzhaltermuster ist immer erfolgreich (passt auf alles) und bindet " +"keinen Namen. Syntax:" msgid "" "``_`` is a :ref:`soft keyword ` within any pattern, but only " "within patterns. It is an identifier, as usual, even within ``match`` " "subject expressions, ``guard``\\ s, and ``case`` blocks." msgstr "" +"``_`` ist ein :ref:`Soft-Schlüsselwort ` innerhalb beliebiger" +" Muster, jedoch ausschließlich innerhalb von Mustern. Es handelt sich wie " +"üblich um einen Bezeichner, selbst innerhalb von ``match`` Subjekt-" +"Ausdrücken, ``guard``\\ s und ``case`` Blöcken." msgid "In simple terms, ``_`` will always succeed." -msgstr "" +msgstr "Einfach ausgedrückt: ``_`` wird immer erfolgreich sein." msgid "Value Patterns" -msgstr "" +msgstr "Wertmuster" msgid "A value pattern represents a named value in Python. Syntax:" -msgstr "" +msgstr "Ein Wertmuster repräsentiert einen benannten Wert in Python. Syntax:" msgid "" -"The dotted name in the pattern is looked up using standard Python :ref:`name " -"resolution rules `. The pattern succeeds if the value found " -"compares equal to the subject value (using the ``==`` equality operator)." +"The dotted name in the pattern is looked up using standard Python :ref:`name" +" resolution rules `. The pattern succeeds if the value found" +" compares equal to the subject value (using the ``==`` equality operator)." msgstr "" +"Der mit einem Punkt gekennzeichnete Name im Muster wird anhand der " +"Standardregeln für die Namensauflösung in Python nachgeschlagen: :ref:` " +"`. Das Muster ist erfolgreich, wenn der gefundene Wert mit " +"dem Suchwert übereinstimmt (unter Verwendung des Gleichheitsoperators ``==``" +" )." msgid "" -"In simple terms ``NAME1.NAME2`` will succeed only if `` == NAME1." -"NAME2``" +"In simple terms ``NAME1.NAME2`` will succeed only if `` == " +"NAME1.NAME2``" msgstr "" +"Einfach ausgedrückt: ``NAME1.NAME2`` wird nur dann erfolgreich sein, " +"wenn `` == NAME1.NAME2``" msgid "" "If the same value occurs multiple times in the same match statement, the " @@ -933,36 +1364,54 @@ msgid "" "the same lookup. This cache is strictly tied to a given execution of a " "given match statement." msgstr "" +"Wenn derselbe Wert mehrmals in derselben \"match\"-Anweisung vorkommt, kann " +"der Interpreter den zuerst gefundenen Wert zwischenspeichern und " +"wiederverwenden, anstatt die Suche erneut durchzuführen. Dieser " +"Zwischenspeicher ist streng an eine bestimmte Ausführung einer bestimmten " + \"match\"-Anweisung gebunden." msgid "Group Patterns" -msgstr "" +msgstr "Gruppenmuster" msgid "" -"A group pattern allows users to add parentheses around patterns to emphasize " -"the intended grouping. Otherwise, it has no additional syntax. Syntax:" +"A group pattern allows users to add parentheses around patterns to emphasize" +" the intended grouping. Otherwise, it has no additional syntax. Syntax:" msgstr "" +"Ein Gruppenmuster ermöglicht es Benutzern, Muster in Klammern zu setzen, um " +"die beabsichtigte Gruppierung hervorzuheben. Ansonsten gibt es keine " +"zusätzliche Syntax. Syntax:" msgid "In simple terms ``(P)`` has the same effect as ``P``." -msgstr "" +msgstr "Einfach ausgedrückt hat ``(P)`` dieselbe Wirkung wie ``P`` ." msgid "Sequence Patterns" -msgstr "" +msgstr "Sequenzmuster" msgid "" "A sequence pattern contains several subpatterns to be matched against " -"sequence elements. The syntax is similar to the unpacking of a list or tuple." +"sequence elements. The syntax is similar to the unpacking of a list or " +"tuple." msgstr "" +"Ein Sequenzmuster enthält mehrere Untermuster, die mit Sequenzelementen " +"abgeglichen werden sollen. Die Syntax ähnelt dem Entpacken einer Liste oder " +"eines Tupels." msgid "" "There is no difference if parentheses or square brackets are used for " "sequence patterns (i.e. ``(...)`` vs ``[...]`` )." msgstr "" +"Es spielt keine Rolle, ob für Sequenzmuster runde Klammern oder eckige " +"Klammern verwendet werden (d. h. ``(...)`` vs. ``[...]`` )." msgid "" -"A single pattern enclosed in parentheses without a trailing comma (e.g. ``(3 " -"| 4)``) is a :ref:`group pattern `. While a single pattern " +"A single pattern enclosed in parentheses without a trailing comma (e.g. ``(3" +" | 4)``) is a :ref:`group pattern `. While a single pattern " "enclosed in square brackets (e.g. ``[3 | 4]``) is still a sequence pattern." msgstr "" +"Ein einzelnes Muster in runden Klammern ohne abschließendes Komma (z. B. " +"``(3 | 4)``) ist ein :ref:`Gruppenmuster `. Ein einzelnes " +"Muster in eckigen Klammern (z. B. ``[3 | 4]``) ist hingegen weiterhin ein " +"Sequenzmuster." msgid "" "At most one star subpattern may be in a sequence pattern. The star " @@ -970,265 +1419,376 @@ msgid "" "sequence pattern is a fixed-length sequence pattern; otherwise it is a " "variable-length sequence pattern." msgstr "" +"Ein Sequenzmuster darf höchstens ein Stern-Teilmuster enthalten. Das Stern-" +"Teilmuster kann an beliebiger Stelle vorkommen. Ist kein Stern-Teilmuster " +"vorhanden, handelt es sich um ein Sequenzmuster fester Länge; andernfalls " +"handelt es sich um ein Sequenzmuster variabler Länge." msgid "" "The following is the logical flow for matching a sequence pattern against a " "subject value:" msgstr "" +"Im Folgenden wird der logische Ablauf beim Abgleich eines Sequenzmusters mit" +" einem Zielwert beschrieben:" msgid "" "If the subject value is not a sequence [#]_, the sequence pattern fails." msgstr "" +"Ist der Wert des Subjekts kein Sequenz [#]_, schlägt das Sequenzmuster fehl." msgid "" "If the subject value is an instance of ``str``, ``bytes`` or ``bytearray`` " "the sequence pattern fails." msgstr "" +"Wenn der Wert des Subjekts eine Instanz von ``str``, ``bytes`` oder " +" ``bytearray`` ist, schlägt das Sequenzmuster fehl." msgid "" "The subsequent steps depend on whether the sequence pattern is fixed or " "variable-length." msgstr "" +"Die weiteren Schritte hängen davon ab, ob das Sequenzmuster eine feste oder " +"eine variable Länge hat." msgid "If the sequence pattern is fixed-length:" -msgstr "" +msgstr "Wenn das Sequenzmuster eine feste Länge hat:" msgid "" "If the length of the subject sequence is not equal to the number of " "subpatterns, the sequence pattern fails" msgstr "" +"Wenn die Länge der zu prüfenden Sequenz nicht mit der Anzahl der Teilmuster " +"übereinstimmt, schlägt die Sequenzprüfung fehl." msgid "" -"Subpatterns in the sequence pattern are matched to their corresponding items " -"in the subject sequence from left to right. Matching stops as soon as a " +"Subpatterns in the sequence pattern are matched to their corresponding items" +" in the subject sequence from left to right. Matching stops as soon as a " "subpattern fails. If all subpatterns succeed in matching their " "corresponding item, the sequence pattern succeeds." msgstr "" +"Teilmuster im Sequenzmuster werden von links nach rechts mit den " +"entsprechenden Elementen in der zu prüfenden Sequenz abgeglichen. Der " +"Abgleich wird beendet, sobald ein Teilmuster nicht übereinstimmt. Wenn alle " +"Teilmuster erfolgreich mit den entsprechenden Elementen abgeglichen werden, " +"gilt das Sequenzmuster als erfolgreich." msgid "Otherwise, if the sequence pattern is variable-length:" -msgstr "" +msgstr "Andernfalls, wenn das Sequenzmuster eine variable Länge hat:" msgid "" "If the length of the subject sequence is less than the number of non-star " "subpatterns, the sequence pattern fails." msgstr "" +"Ist die Länge der zu prüfenden Sequenz kürzer als die Anzahl der Nicht-" +"Stern-Teilmuster, gilt das Sequenzmuster als nicht erfüllt." msgid "" -"The leading non-star subpatterns are matched to their corresponding items as " -"for fixed-length sequences." +"The leading non-star subpatterns are matched to their corresponding items as" +" for fixed-length sequences." msgstr "" +"Die führenden Teilmuster ohne Sternzeichen werden wie bei Sequenzen fester " +"Länge ihren entsprechenden Elementen zugeordnet." msgid "" "If the previous step succeeds, the star subpattern matches a list formed of " "the remaining subject items, excluding the remaining items corresponding to " "non-star subpatterns following the star subpattern." msgstr "" +"Wenn der vorherige Schritt erfolgreich ist, passt das Stern-Teilmuster auf " +"eine Liste, die aus den verbleibenden Suchbegriffen gebildet wird, wobei die" +" verbleibenden Begriffe, die Nicht-Stern-Teilmuster im Anschluss an das " +"Stern-Teilmuster entsprechen, ausgeschlossen werden." msgid "" "Remaining non-star subpatterns are matched to their corresponding subject " "items, as for a fixed-length sequence." msgstr "" +"Die verbleibenden Teilmuster ohne Stern werden wie bei einer Sequenz fester " +"Länge ihren entsprechenden Subjektelementen zugeordnet." msgid "" -"The length of the subject sequence is obtained via :func:`len` (i.e. via " -"the :meth:`~object.__len__` protocol). This length may be cached by the " +"The length of the subject sequence is obtained via :func:`len` (i.e. via the" +" :meth:`~object.__len__` protocol). This length may be cached by the " "interpreter in a similar manner as :ref:`value patterns `." msgstr "" +"Die Länge der Objektsequenz wird über :func:`len` ermittelt (d. h. über das " +":meth:`~object.__len__` Protokoll ). Diese Länge kann vom Interpreter auf" +" ähnliche Weise wie :ref:`Wertmuster ` zwischengespeichert " +"werden." msgid "" "In simple terms ``[P1, P2, P3,`` ... ``, P]`` matches only if all the " "following happens:" msgstr "" +"Einfach ausgedrückt: ``[P1, P2, P3,``... ``, P]`` ergibt nur dann eine " +"Übereinstimmung, wenn alle folgenden Bedingungen erfüllt sind:" msgid "check ```` is a sequence" -msgstr "" +msgstr "Überprüfe, ob ```` eine Folge ist" msgid "``len(subject) == ``" -msgstr "" +msgstr "``len(subject) == ``" msgid "" "``P1`` matches ``[0]`` (note that this match can also bind names)" msgstr "" +"``P1`` entspricht ``[0]`` (beachte, dass diese Übereinstimmung " +"auch Namen binden kann)" msgid "" "``P2`` matches ``[1]`` (note that this match can also bind names)" msgstr "" +"``P2`` entspricht ``[1]`` (beachte, dass diese Übereinstimmung " +"auch Namen binden kann)" msgid "... and so on for the corresponding pattern/element." -msgstr "" +msgstr "... und so weiter für das jeweilige Muster bzw. Element." msgid "Mapping Patterns" -msgstr "" +msgstr "Zuordnungsmuster" msgid "" "A mapping pattern contains one or more key-value patterns. The syntax is " "similar to the construction of a dictionary. Syntax:" msgstr "" +"Ein Zuordnungsmuster enthält ein oder mehrere Schlüssel-Wert-Muster. Die " +"Syntax ähnelt dem Aufbau eines Wörterbuchs. Syntax:" msgid "" "At most one double star pattern may be in a mapping pattern. The double " "star pattern must be the last subpattern in the mapping pattern." msgstr "" +"Ein Zuordnungsmuster darf höchstens ein Doppelsternmuster enthalten. Das " +"Doppelsternmuster muss das letzte Teilmuster im Zuordnungsmuster sein." msgid "" "Duplicate keys in mapping patterns are disallowed. Duplicate literal keys " -"will raise a :exc:`SyntaxError`. Two keys that otherwise have the same value " -"will raise a :exc:`ValueError` at runtime." +"will raise a :exc:`SyntaxError`. Two keys that otherwise have the same value" +" will raise a :exc:`ValueError` at runtime." msgstr "" +"Doppelte Schlüssel in Zuordnungsmustern sind nicht zulässig. Doppelte " +"Literalschlüssel lösen eine :exc:`SyntaxError` aus. Zwei Schlüssel, die " +"ansonsten denselben Wert haben, lösen zur Laufzeit eine :exc:`ValueError` " +" aus." msgid "" "The following is the logical flow for matching a mapping pattern against a " "subject value:" msgstr "" +"Im Folgenden wird der logische Ablauf beim Abgleich eines Zuordnungsmusters " +"mit einem Objektwert beschrieben:" msgid "If the subject value is not a mapping [#]_,the mapping pattern fails." msgstr "" +"Wenn der Wert des Subjekts kein Zuordnungs [#]_ ist, schlägt das " +"Zuordnungsmuster fehl." msgid "" -"If every key given in the mapping pattern is present in the subject mapping, " -"and the pattern for each key matches the corresponding item of the subject " +"If every key given in the mapping pattern is present in the subject mapping," +" and the pattern for each key matches the corresponding item of the subject " "mapping, the mapping pattern succeeds." msgstr "" +"Wenn jeder im Zuordnungsmuster angegebene Schlüssel in der Zielzuordnung " +"vorhanden ist und das Muster für jeden Schlüssel mit dem entsprechenden " +"Eintrag in der Zielzuordnung übereinstimmt, ist das Zuordnungsmuster " +"erfolgreich." msgid "" "If duplicate keys are detected in the mapping pattern, the pattern is " "considered invalid. A :exc:`SyntaxError` is raised for duplicate literal " "values; or a :exc:`ValueError` for named keys of the same value." msgstr "" +"Werden im Zuordnungsmuster doppelte Schlüssel erkannt, gilt das Muster als " +"ungültig. Bei doppelten Literalwerten wird eine :exc:`SyntaxError` " +"ausgelöst; bei benannten Schlüsseln mit identischem Wert eine " +":exc:`ValueError` ." msgid "" "Key-value pairs are matched using the two-argument form of the mapping " -"subject's ``get()`` method. Matched key-value pairs must already be present " -"in the mapping, and not created on-the-fly via :meth:`~object.__missing__` " +"subject's ``get()`` method. Matched key-value pairs must already be present" +" in the mapping, and not created on-the-fly via :meth:`~object.__missing__` " "or :meth:`~object.__getitem__`." msgstr "" +"Schlüssel-Wert-Paare werden mithilfe der Zwei-Argument-Form der Methode " +"``get()`` des Mapping-Objekts abgeglichen. Die abgeglichenen Schlüssel-" +"Wert-Paare müssen bereits im Mapping vorhanden sein und dürfen nicht " +"dynamisch über :meth:`~object.__missing__` oder " +":meth:`~object.__getitem__` erstellt werden." msgid "" "In simple terms ``{KEY1: P1, KEY2: P2, ... }`` matches only if all the " "following happens:" msgstr "" +"Einfach ausgedrückt: ``{KEY1: P1, KEY2: P2, ... }`` ergibt nur dann eine" +" Übereinstimmung, wenn alle folgenden Bedingungen erfüllt sind:" msgid "check ```` is a mapping" -msgstr "" +msgstr "Schau mal unter ```` nach – dort findest du eine Karte." msgid "``KEY1 in ``" -msgstr "" +msgstr "``KEY1 in ``" msgid "``P1`` matches ``[KEY1]``" -msgstr "" +msgstr "``P1`` stimmt mit ``[KEY1]`` überein." msgid "... and so on for the corresponding KEY/pattern pair." -msgstr "" +msgstr "... und so weiter für das jeweilige Schlüssel-Muster-Paar." msgid "Class Patterns" -msgstr "" +msgstr "Klassenmuster" msgid "" "A class pattern represents a class and its positional and keyword arguments " "(if any). Syntax:" msgstr "" +"Ein Klassenmuster repräsentiert eine Klasse sowie deren Positions- und " +"Schlüsselwortargumente (sofern vorhanden). Syntax:" msgid "The same keyword should not be repeated in class patterns." msgstr "" +"Dasselbe Schlüsselwort sollte in Klassenmustern nicht wiederholt werden." msgid "" "The following is the logical flow for matching a class pattern against a " "subject value:" msgstr "" +"Im Folgenden wird der logische Ablauf beim Abgleich eines Klassenmusters mit" +" einem Subjektwert beschrieben:" msgid "" -"If ``name_or_attr`` is not an instance of the builtin :class:`type` , raise :" -"exc:`TypeError`." +"If ``name_or_attr`` is not an instance of the builtin :class:`type` , raise " +":exc:`TypeError`." msgstr "" +"Wenn ``name_or_attr`` keine Instanz der integrierten Klasse " +":class:`type` ist, wird ein :exc:`TypeError` ausgelöst." msgid "" -"If the subject value is not an instance of ``name_or_attr`` (tested via :" -"func:`isinstance`), the class pattern fails." +"If the subject value is not an instance of ``name_or_attr`` (tested via " +":func:`isinstance`), the class pattern fails." msgstr "" +"Wenn der Wert des Subjekts keine Instanz von ``name_or_attr`` ist " +"(geprüft über :func:`isinstance`) , schlägt das Klassenmuster fehl." msgid "" "If no pattern arguments are present, the pattern succeeds. Otherwise, the " "subsequent steps depend on whether keyword or positional argument patterns " "are present." msgstr "" +"Sind keine Musterargumente vorhanden, ist die Musterprüfung erfolgreich. " +"Andernfalls hängen die nachfolgenden Schritte davon ab, ob Muster für " +"Schlüsselwort- oder Positionsargumente vorhanden sind." msgid "" "For a number of built-in types (specified below), a single positional " "subpattern is accepted which will match the entire subject; for these types " "keyword patterns also work as for other types." msgstr "" +"Bei einer Reihe von integrierten Typen (siehe unten) wird ein einzelnes " +"positionelles Teilmuster akzeptiert, das mit dem gesamten Subjekt " +"übereinstimmt; bei diesen Typen funktionieren Schlüsselwortmuster ebenso wie" +" bei anderen Typen." msgid "" "If only keyword patterns are present, they are processed as follows, one by " "one:" msgstr "" +"Sind nur Schlüsselwortmuster vorhanden, werden diese nacheinander wie folgt " +"verarbeitet:" -msgid "I. The keyword is looked up as an attribute on the subject." -msgstr "" +msgid "The keyword is looked up as an attribute on the subject." +msgstr "Das Schlüsselwort wird als Attribut des Subjekts nachgeschlagen." msgid "" "If this raises an exception other than :exc:`AttributeError`, the exception " "bubbles up." msgstr "" +"Wenn dabei eine andere Ausnahme als :exc:`AttributeError` ausgelöst " +"wird, wird die Ausnahme weitergeleitet." msgid "If this raises :exc:`AttributeError`, the class pattern has failed." msgstr "" +"Wenn dabei ein :exc:`AttributeError` ausgelöst wird, ist das " +"Klassenmuster fehlgeschlagen." msgid "" "Else, the subpattern associated with the keyword pattern is matched against " "the subject's attribute value. If this fails, the class pattern fails; if " "this succeeds, the match proceeds to the next keyword." msgstr "" +"Andernfalls wird das mit dem Schlüsselwortmuster verknüpfte Teilmuster mit " +"dem Attributwert des Subjekts abgeglichen. Gelingt dies nicht, schlägt das " +"Klassenmuster fehl; gelingt es, wird der Abgleich mit dem nächsten " +"Schlüsselwort fortgesetzt." -msgid "II. If all keyword patterns succeed, the class pattern succeeds." +msgid "If all keyword patterns succeed, the class pattern succeeds." msgstr "" +"Wenn alle Schlüsselwortmuster erfolgreich sind, ist das Klassenmuster " +"erfolgreich." msgid "" "If any positional patterns are present, they are converted to keyword " "patterns using the :data:`~object.__match_args__` attribute on the class " "``name_or_attr`` before matching:" msgstr "" +"Falls Positionsmuster vorhanden sind, werden diese vor dem Abgleich mithilfe" +" des Attributs :data:`~object.__match_args__` der Klasse " +"``name_or_attr`` in Schlüsselwortmuster umgewandelt:" -msgid "" -"I. The equivalent of ``getattr(cls, \"__match_args__\", ())`` is called." +msgid "The equivalent of ``getattr(cls, \"__match_args__\", ())`` is called." msgstr "" +"Es wird das Äquivalent von ``getattr(cls, \"__match_args__\", ())`` " +"aufgerufen." msgid "If this raises an exception, the exception bubbles up." msgstr "" +"Wenn dabei eine Ausnahme ausgelöst wird, wird diese nach oben " +"weitergeleitet." msgid "" -"If the returned value is not a tuple, the conversion fails and :exc:" -"`TypeError` is raised." +"If the returned value is not a tuple, the conversion fails and " +":exc:`TypeError` is raised." msgstr "" +"Wenn der Rückgabewert kein Tupel ist, schlägt die Konvertierung fehl und es " +"wird ein :exc:`TypeError` -Fehler ausgelöst." msgid "" -"If there are more positional patterns than ``len(cls.__match_args__)``, :exc:" -"`TypeError` is raised." +"If there are more positional patterns than ``len(cls.__match_args__)``, " +":exc:`TypeError` is raised." msgstr "" +"Wenn es mehr Positionsmuster gibt als ``len(cls.__match_args__)``, wird " +":exc:`TypeError` ausgelöst." msgid "" "Otherwise, positional pattern ``i`` is converted to a keyword pattern using " "``__match_args__[i]`` as the keyword. ``__match_args__[i]`` must be a " "string; if not :exc:`TypeError` is raised." msgstr "" +"Andernfalls wird das Positionsmuster ``i`` mithilfe von " +"``__match_args__[i]`` als Schlüsselwort in ein Schlüsselwortmuster " +"umgewandelt. ``__match_args__[i]`` muss eine Zeichenkette sein; " +"andernfalls wird :exc:`TypeError` ausgelöst." msgid "If there are duplicate keywords, :exc:`TypeError` is raised." msgstr "" +"Wenn doppelte Schlüsselwörter vorhanden sind, wird ein :exc:`TypeError` " +"ausgelöst." msgid ":ref:`class-pattern-matching`" -msgstr "" +msgstr ":ref:`class-pattern-matching`" msgid "" -"II. Once all positional patterns have been converted to keyword patterns," -msgstr "" - -msgid "the match proceeds as if there were only keyword patterns." +"Once all positional patterns have been converted to keyword patterns, the " +"match proceeds as if there were only keyword patterns." msgstr "" +"Sobald alle Positionsmuster in Schlüsselwortmuster umgewandelt wurden, " +"verläuft die Suche so, als gäbe es nur Schlüsselwortmuster." msgid "" "For the following built-in types the handling of positional subpatterns is " "different:" msgstr "" +"Bei den folgenden integrierten Typen unterscheidet sich die Behandlung von " +"Positionsuntermustern:" msgid ":class:`bool`" msgstr "" @@ -1268,49 +1828,68 @@ msgid "" "matched against the whole object rather than an attribute. For example " "``int(0|1)`` matches the value ``0``, but not the value ``0.0``." msgstr "" +"Diese Klassen akzeptieren ein einzelnes positionsbezogenes Argument, und das" +" Muster wird dabei mit dem gesamten Objekt abgeglichen und nicht mit einem " +"Attribut. Beispielsweise passt ``int(0|1)`` auf den Wert ``0``, " +"nicht jedoch auf den Wert ``0.0`` ." msgid "" "In simple terms ``CLS(P1, attr=P2)`` matches only if the following happens:" msgstr "" +"Einfach ausgedrückt passt ``CLS(P1, attr=P2)`` nur dann, wenn Folgendes " +"zutrifft:" msgid "``isinstance(, CLS)``" -msgstr "" +msgstr "``isinstance(, CLS)``" msgid "convert ``P1`` to a keyword pattern using ``CLS.__match_args__``" msgstr "" +"``P1`` mithilfe von in ein Schlüsselwortmuster umwandeln " +"``CLS.__match_args__``" msgid "For each keyword argument ``attr=P2``:" -msgstr "" +msgstr "Für jedes Schlüsselwortargument ``attr=P2``:" msgid "``hasattr(, \"attr\")``" -msgstr "" +msgstr "``hasattr(, \"attr\")``" msgid "``P2`` matches ``.attr``" -msgstr "" +msgstr "``P2`` stimmt mit ``.attr`` überein" msgid "... and so on for the corresponding keyword argument/pattern pair." msgstr "" +"... und so weiter für das entsprechende Schlüsselwort-Argument-Muster-Paar." msgid "Function definitions" -msgstr "" +msgstr "Funktionsdefinitionen" msgid "" -"A function definition defines a user-defined function object (see section :" -"ref:`types`):" +"A function definition defines a user-defined function object (see section " +":ref:`types`):" msgstr "" +"Eine Funktionsdefinition definiert ein benutzerdefiniertes Funktionsobjekt " +"(siehe Abschnitt :ref:`types`):" msgid "" "A function definition is an executable statement. Its execution binds the " -"function name in the current local namespace to a function object (a wrapper " -"around the executable code for the function). This function object contains " -"a reference to the current global namespace as the global namespace to be " -"used when the function is called." +"function name in the current local namespace to a function object (a wrapper" +" around the executable code for the function). This function object " +"contains a reference to the current global namespace as the global namespace" +" to be used when the function is called." msgstr "" +"Eine Funktionsdefinition ist eine ausführbare Anweisung. Durch ihre " +"Ausführung wird der Funktionsname im aktuellen lokalen Namensraum an ein " +"Funktionsobjekt gebunden (eine Hülle um den ausführbaren Code der Funktion)." +" Dieses Funktionsobjekt enthält einen Verweis auf den aktuellen globalen " +"Namensraum als den globalen Namensraum, der beim Aufruf der Funktion " +"verwendet werden soll." msgid "" "The function definition does not execute the function body; this gets " "executed only when the function is called. [#]_" msgstr "" +"Bei der Funktionsdefinition wird der Funktionskörper nicht ausgeführt; " +"dieser wird erst ausgeführt, wenn die Funktion aufgerufen wird. [#]_" msgid "" "A function definition may be wrapped by one or more :term:`decorator` " @@ -1321,31 +1900,49 @@ msgid "" "function object. Multiple decorators are applied in nested fashion. For " "example, the following code ::" msgstr "" +"Eine Funktionsdefinition kann von einem oder mehreren " +":term:`Decorator`-Ausdrücken umschlossen sein. Decorator-Ausdrücke werden " +"bei der Definition der Funktion in dem Geltungsbereich ausgewertet, der die " +"Funktionsdefinition enthält. Das Ergebnis muss ein aufrufbares Objekt sein, " +"das mit dem Funktionsobjekt als einzigem Argument aufgerufen wird. Der " +"zurückgegebene Wert wird an den Funktionsnamen statt an das Funktionsobjekt " +"gebunden. Mehrere Dekoratoren werden verschachtelt angewendet. " +"Beispielsweise der folgende Code ::" msgid "" "@f1(arg)\n" "@f2\n" "def func(): pass" msgstr "" +"@f1(arg)\n" +"@f2\n" +"def func(): pass" msgid "is roughly equivalent to ::" -msgstr "" +msgstr "entspricht in etwa ::" msgid "" "def func(): pass\n" "func = f1(arg)(f2(func))" msgstr "" +"def func(): pass\n" +"func = f1(arg)(f2(func))" msgid "" "except that the original function is not temporarily bound to the name " "``func``." msgstr "" +"außer dass die ursprüngliche Funktion nicht vorübergehend an den Namen " +"``func`` gebunden ist." msgid "" -"Functions may be decorated with any valid :token:`~python-grammar:" -"assignment_expression`. Previously, the grammar was much more restrictive; " -"see :pep:`614` for details." +"Functions may be decorated with any valid :token:`~python-" +"grammar:assignment_expression`. Previously, the grammar was much more " +"restrictive; see :pep:`614` for details." msgstr "" +"Funktionen können mit jedem gültigen :token:`~python-" +"grammar:assignment_expression` versehen werden. Früher war die Syntax " +"wesentlich restriktiver; weitere Informationen finden Sie unter :pep:`614`." msgid "" "A list of :ref:`type parameters ` may be given in square " @@ -1355,19 +1952,35 @@ msgid "" "function's :attr:`~function.__type_params__` attribute. See :ref:`generic-" "functions` for more." msgstr "" +"Eine Liste von :ref:`Typ-Parametern ` kann in eckigen Klammern " +"zwischen dem Namen der Funktion und der öffnenden Klammer für ihre " +"Parameterliste angegeben werden. Dies signalisiert statischen Typprüfern, " +"dass es sich um eine generische Funktion handelt. Zur Laufzeit können die " +"Typ-Parameter über das Attribut :attr:`~function.__type_params__` der " +"Funktion abgerufen werden. Weitere Informationen finden Sie unter " +":ref:`generic-functions`." msgid "Type parameter lists are new in Python 3.12." -msgstr "" +msgstr "Typ-Parameterlisten sind eine Neuerung in Python 3.12." msgid "" "When one or more :term:`parameters ` have the form *parameter* " -"``=`` *expression*, the function is said to have \"default parameter values." -"\" For a parameter with a default value, the corresponding :term:`argument` " -"may be omitted from a call, in which case the parameter's default value is " -"substituted. If a parameter has a default value, all following parameters " -"up until the \"``*``\" must also have a default value --- this is a " -"syntactic restriction that is not expressed by the grammar." -msgstr "" +"``=`` *expression*, the function is said to have \"default parameter " +"values.\" For a parameter with a default value, the corresponding " +":term:`argument` may be omitted from a call, in which case the parameter's " +"default value is substituted. If a parameter has a default value, all " +"following parameters up until the \"``*``\" must also have a default value " +"--- this is a syntactic restriction that is not expressed by the grammar." +msgstr "" +"Wenn ein oder mehrere :term:`Parameter ` die Form *Parameter* " +"``=`` *Ausdruck* haben, spricht man davon, dass die Funktion " + \"Standardparameterwerte\"; besitzt. Bei einem Parameter mit einem Standardwert" +" kann das entsprechende :term:`Argument` bei einem Aufruf weggelassen " +"werden; in diesem Fall wird der Standardwert des Parameters eingesetzt. " +"Wenn ein Parameter einen Standardwert hat, müssen auch alle nachfolgenden " +"Parameter bis zum ``*`` einen Standardwert haben – dies ist eine " +"syntaktische Einschränkung, die in der Grammatik nicht ausdrücklich erwähnt " +"wird." msgid "" "**Default parameter values are evaluated from left to right when the " @@ -1375,11 +1988,23 @@ msgid "" "evaluated once, when the function is defined, and that the same \"pre-" "computed\" value is used for each call. This is especially important to " "understand when a default parameter value is a mutable object, such as a " -"list or a dictionary: if the function modifies the object (e.g. by appending " -"an item to a list), the default parameter value is in effect modified. This " -"is generally not what was intended. A way around this is to use ``None`` as " -"the default, and explicitly test for it in the body of the function, e.g.::" -msgstr "" +"list or a dictionary: if the function modifies the object (e.g. by appending" +" an item to a list), the default parameter value is in effect modified. " +"This is generally not what was intended. A way around this is to use " +"``None`` as the default, and explicitly test for it in the body of the " +"function, for example::" +msgstr "" +"**Standardparameterwerte werden bei der Ausführung der Funktionsdefinition " +"von links nach rechts ausgewertet.** Das bedeutet, dass der Ausdruck " +"einmalig bei der Definition der Funktion ausgewertet wird und dass bei jedem" +" Aufruf derselbe \"vorberechnete\"; Wert verwendet wird. Dies ist besonders " +"wichtig zu verstehen, wenn ein Standardparameterwert ein veränderbliches " +"Objekt ist, wie beispielsweise eine Liste oder ein Wörterbuch: Wenn die " +"Funktion das Objekt verändert (z. B. durch Anhängen eines Elements an eine " +"Liste), wird der Standardparameterwert faktisch verändert. Dies ist in der " +"Regel nicht beabsichtigt. Eine Möglichkeit, dies zu umgehen, besteht darin," +" ``None`` als Standardwert zu verwenden und im Funktionskörper explizit " +"darauf zu prüfen, zum Beispiel::" msgid "" "def whats_on_the_telly(penguin=None):\n" @@ -1388,13 +2013,18 @@ msgid "" " penguin.append(\"property of the zoo\")\n" " return penguin" msgstr "" +"def was_läuft_im_Fernseher(Pinguin=None):\n" +" if Pinguin is None:\n" +" Pinguin = []\n" +" Pinguin.append(\"Eigentum des Zoos\")\n" +" return Pinguin" msgid "" -"Function call semantics are described in more detail in section :ref:" -"`calls`. A function call always assigns values to all parameters mentioned " -"in the parameter list, either from positional arguments, from keyword " -"arguments, or from default values. If the form \"``*identifier``\" is " -"present, it is initialized to a tuple receiving any excess positional " +"Function call semantics are described in more detail in section " +":ref:`calls`. A function call always assigns values to all parameters " +"mentioned in the parameter list, either from positional arguments, from " +"keyword arguments, or from default values. If the form \"``*identifier``\" " +"is present, it is initialized to a tuple receiving any excess positional " "parameters, defaulting to the empty tuple. If the form \"``**identifier``\" " "is present, it is initialized to a new ordered mapping receiving any excess " "keyword arguments, defaulting to a new empty mapping of the same type. " @@ -1403,11 +2033,27 @@ msgid "" "\"``/``\" are positional-only parameters and may only be passed by " "positional arguments." msgstr "" +"Die Semantik von Funktionsaufrufen wird im Abschnitt :ref:`calls` näher " +"beschrieben. Ein Funktionsaufruf weist allen in der Parameterliste genannten" +" Parametern Werte zu, entweder aus Positionsargumenten, aus " +"Schlüsselwortargumenten oder aus Standardwerten. Ist die Form " +"``*identifier`` vorhanden, wird sie mit einem Tupel initialisiert, das " +"alle überschüssigen Positionsargumente aufnimmt; der Standardwert ist ein " +"leeres Tupel. Ist die Form ``**identifier`` vorhanden, wird sie mit einer" +" neuen geordneten Zuordnung initialisiert, die alle überschüssigen " +"Schlüsselwortargumente aufnimmt; der Standardwert ist eine neue leere " +"Zuordnung desselben Typs. Parameter nach ``*`` oder ``*identifier`` " +"sind reine Schlüsselwortparameter und dürfen nur über Schlüsselwortargumente" +" übergeben werden. Parameter vor ``/`` sind reine Positionsparameter und" +" dürfen nur über Positionsargumente übergeben werden." msgid "" "The ``/`` function parameter syntax may be used to indicate positional-only " "parameters. See :pep:`570` for details." msgstr "" +"Die Parametersyntax der Funktion ``/`` kann verwendet werden, um rein " +"positionelle Parameter anzugeben. Weitere Informationen finden Sie unter " +":pep:`570`." msgid "" "Parameters may have an :term:`annotation ` of the form " @@ -1416,15 +2062,27 @@ msgid "" "(As a special case, parameters of the form ``*identifier`` may have an " "annotation \"``: *expression``\".) Functions may have \"return\" annotation " "of the form \"``-> expression``\" after the parameter list. These " -"annotations can be any valid Python expression. The presence of annotations " -"does not change the semantics of a function. See :ref:`annotations` for more " -"information on annotations." -msgstr "" +"annotations can be any valid Python expression. The presence of annotations" +" does not change the semantics of a function. See :ref:`annotations` for " +"more information on annotations." +msgstr "" +"Parameter können eine :term:`Anmerkung ` in der Form " +"``: expression`` im Anschluss an den Parameternamen aufweisen. Jeder " +"Parameter kann eine Anmerkung haben, auch solche der Form ``*identifier`` " +"oder ``**identifier``. (Als Sonderfall können Parameter der Form " +"``*identifier`` eine Anmerkung ``: *expression`` haben.) Funktionen " +"können nach der Parameterliste eine \"return\"-Anmerkung der Form ``-> " +"expression`` haben. Diese Anmerkungen können beliebige gültige Python-" +"Ausdrücke sein. Das Vorhandensein von Annotationen ändert nichts an der " +"Semantik einer Funktion. Weitere Informationen zu Annotationen finden Sie " +"unter :ref:`annotations`." msgid "" "Parameters of the form \"``*identifier``\" may have an annotation \"``: " "*expression``\". See :pep:`646`." msgstr "" +"Parameter der Form ``*identifier`` können mit der Anmerkung ``: " +"*expression`` versehen sein. Siehe :pep:`646`." msgid "" "It is also possible to create anonymous functions (functions not bound to a " @@ -1432,68 +2090,101 @@ msgid "" "described in section :ref:`lambda`. Note that the lambda expression is " "merely a shorthand for a simplified function definition; a function defined " "in a \":keyword:`def`\" statement can be passed around or assigned to " -"another name just like a function defined by a lambda expression. The \":" -"keyword:`!def`\" form is actually more powerful since it allows the " +"another name just like a function defined by a lambda expression. The " +"\":keyword:`!def`\" form is actually more powerful since it allows the " "execution of multiple statements and annotations." msgstr "" +"Es ist auch möglich, anonyme Funktionen (Funktionen, die nicht an einen " +"Namen gebunden sind) zu erstellen, die direkt in Ausdrücken verwendet werden" +" können. Hierfür werden Lambda-Ausdrücke verwendet, die im Abschnitt " +":ref:`lambda` beschrieben sind. Beachten Sie, dass der Lambda-Ausdruck " +"lediglich eine Kurzschreibweise für eine vereinfachte Funktionsdefinition " +"ist; eine in einer :keyword:`def` -Anweisung definierte Funktion kann " +"genau wie eine durch einen Lambda-Ausdruck definierte Funktion weitergegeben" +" oder einem anderen Namen zugewiesen werden. Die Form :keyword:`!def` ist" +" sogar noch leistungsfähiger, da sie die Ausführung mehrerer Anweisungen und" +" Annotationen ermöglicht." msgid "" "**Programmer's note:** Functions are first-class objects. A \"``def``\" " "statement executed inside a function definition defines a local function " "that can be returned or passed around. Free variables used in the nested " -"function can access the local variables of the function containing the def. " -"See section :ref:`naming` for details." +"function can access the local variables of the function containing the def." +" See section :ref:`naming` for details." msgstr "" +"**Anmerkung des Programmierers:** Funktionen sind Objekte erster Klasse. " +"Eine innerhalb einer Funktionsdefinition ausgeführte Anweisung ``def`` " +"definiert eine lokale Funktion, die zurückgegeben oder weitergegeben werden " +"kann. Freie Variablen, die in der verschachtelten Funktion verwendet werden," +" können auf die lokalen Variablen der Funktion zugreifen, die die " + \"def\"-Anweisung enthält. Weitere Informationen finden Sie im Abschnitt " +":ref:`naming` ." msgid ":pep:`3107` - Function Annotations" -msgstr "" +msgstr ":pep:`3107` - Funktionsanmerkungen" msgid "The original specification for function annotations." -msgstr "" +msgstr "Die ursprüngliche Spezifikation für Funktionsannotationen." msgid ":pep:`484` - Type Hints" -msgstr "" +msgstr ":pep:`484` - Typ-Hinweise" msgid "Definition of a standard meaning for annotations: type hints." msgstr "" +"Definition einer einheitlichen Bedeutung für Anmerkungen: Typhinweise." msgid ":pep:`526` - Syntax for Variable Annotations" -msgstr "" +msgstr ":pep:`526` - Syntax für Variablenanmerkungen" msgid "" "Ability to type hint variable declarations, including class variables and " "instance variables." msgstr "" +"Möglichkeit, Typangaben für Variablendeklarationen zu machen, einschließlich" +" Klassenvariablen und Instanzvariablen." msgid ":pep:`563` - Postponed Evaluation of Annotations" -msgstr "" +msgstr ":pep:`563` - Aufgeschobene Auswertung von Anmerkungen" msgid "" "Support for forward references within annotations by preserving annotations " "in a string form at runtime instead of eager evaluation." msgstr "" +"Unterstützung für Vorwärtsverweise innerhalb von Anmerkungen durch die " +"Beibehaltung der Anmerkungen in Zeichenfolgenform zur Laufzeit anstelle " +"einer sofortigen Auswertung." msgid ":pep:`318` - Decorators for Functions and Methods" -msgstr "" +msgstr ":pep:`318` - Dekoratoren für Funktionen und Methoden" msgid "" "Function and method decorators were introduced. Class decorators were " "introduced in :pep:`3129`." msgstr "" +"Es wurden Funktions- und Methoden-Dekoratoren eingeführt. Klassendekoratoren" +" wurden in :pep:`3129` eingeführt." msgid "Class definitions" -msgstr "" +msgstr "Klassendefinitionen" msgid "A class definition defines a class object (see section :ref:`types`):" msgstr "" +"Eine Klassendefinition definiert ein Klassenobjekt (siehe Abschnitt " +":ref:`types`):" msgid "" -"A class definition is an executable statement. The inheritance list usually " -"gives a list of base classes (see :ref:`metaclasses` for more advanced " +"A class definition is an executable statement. The inheritance list usually" +" gives a list of base classes (see :ref:`metaclasses` for more advanced " "uses), so each item in the list should evaluate to a class object which " "allows subclassing. Classes without an inheritance list inherit, by " "default, from the base class :class:`object`; hence, ::" msgstr "" +"Eine Klassendefinition ist eine ausführbare Anweisung. Die Vererbungsliste " +"enthält in der Regel eine Auflistung von Basisklassen (siehe " +":ref:`metaclasses` für fortgeschrittenere Anwendungsmöglichkeiten), daher " +"sollte jedes Element der Liste zu einem Klassenobjekt ausgewertet werden, " +"das die Erstellung von Unterklassen zulässt. Klassen ohne Vererbungsliste " +"erben standardmäßig von der Basisklasse :class:`object` ; daher gilt::" msgid "" "class Foo:\n" @@ -1501,7 +2192,7 @@ msgid "" msgstr "" msgid "is equivalent to ::" -msgstr "" +msgstr "entspricht ::" msgid "" "class Foo(object):\n" @@ -1509,15 +2200,25 @@ msgid "" msgstr "" msgid "" -"The class's suite is then executed in a new execution frame (see :ref:" -"`naming`), using a newly created local namespace and the original global " -"namespace. (Usually, the suite contains mostly function definitions.) When " -"the class's suite finishes execution, its execution frame is discarded but " -"its local namespace is saved. [#]_ A class object is then created using the " -"inheritance list for the base classes and the saved local namespace for the " -"attribute dictionary. The class name is bound to this class object in the " -"original local namespace." +"The class's suite is then executed in a new execution frame (see " +":ref:`naming`), using a newly created local namespace and the original " +"global namespace. (Usually, the suite contains mostly function definitions.)" +" When the class's suite finishes execution, its execution frame is " +"discarded but its local namespace is saved. [#]_ A class object is then " +"created using the inheritance list for the base classes and the saved local " +"namespace for the attribute dictionary. The class name is bound to this " +"class object in the original local namespace." msgstr "" +"Die Suite der Klasse wird dann in einem neuen Ausführungsrahmen (siehe " +":ref:`naming`) unter Verwendung eines neu erstellten lokalen Namensraums und" +" des ursprünglichen globalen Namensraums ausgeführt. (In der Regel enthält " +"die Suite hauptsächlich Funktionsdefinitionen.) Wenn die Suite der Klasse " +"die Ausführung beendet hat, wird ihr Ausführungsrahmen verworfen, ihr " +"lokaler Namensraum jedoch gespeichert. [#]_ Anschließend wird ein " +"Klassenobjekt unter Verwendung der Vererbungsliste für die Basisklassen und " +"des gespeicherten lokalen Namensraums für das Attributwörterbuch erstellt. " +"Der Klassenname wird im ursprünglichen lokalen Namensraum an dieses " +"Klassenobjekt gebunden." msgid "" "The order in which attributes are defined in the class body is preserved in " @@ -1525,14 +2226,22 @@ msgid "" "right after the class is created and only for classes that were defined " "using the definition syntax." msgstr "" +"Die Reihenfolge, in der die Attribute im Klassenkörper definiert sind, " +"bleibt im :attr:`~type.__dict__`` der neuen Klasse erhalten. Beachten Sie," +" dass dies nur unmittelbar nach der Erstellung der Klasse und nur für " +"Klassen gilt, die mithilfe der Definitionssyntax definiert wurden." msgid "" "Class creation can be customized heavily using :ref:`metaclasses " "`." msgstr "" +"Die Erstellung von Klassen lässt sich mithilfe von :ref:`Metaklassen " +"` umfassend anpassen." msgid "Classes can also be decorated: just like when decorating functions, ::" msgstr "" +"Auch Klassen können dekoriert werden: genau wie beim Dekorieren von " +"Funktionen, ::" msgid "" "@f1(arg)\n" @@ -1549,54 +2258,81 @@ msgid "" "The evaluation rules for the decorator expressions are the same as for " "function decorators. The result is then bound to the class name." msgstr "" +"Die Auswertungsregeln für Dekoratorausdrücke entsprechen denen für " +"Funktionsdekoratoren. Das Ergebnis wird dann an den Klassennamen gebunden." msgid "" -"Classes may be decorated with any valid :token:`~python-grammar:" -"assignment_expression`. Previously, the grammar was much more restrictive; " -"see :pep:`614` for details." +"Classes may be decorated with any valid :token:`~python-" +"grammar:assignment_expression`. Previously, the grammar was much more " +"restrictive; see :pep:`614` for details." msgstr "" +"Klassen können mit beliebigen gültigen :token:`~python-" +"grammar:assignment_expression` dekoriert werden. Früher war die Syntax " +"wesentlich restriktiver; Einzelheiten finden Sie unter :pep:`614`." msgid "" "A list of :ref:`type parameters ` may be given in square " "brackets immediately after the class's name. This indicates to static type " "checkers that the class is generic. At runtime, the type parameters can be " -"retrieved from the class's :attr:`~type.__type_params__` attribute. See :ref:" -"`generic-classes` for more." +"retrieved from the class's :attr:`~type.__type_params__` attribute. See " +":ref:`generic-classes` for more." msgstr "" +"Eine Liste der :ref:`Typ-Parameter ` kann unmittelbar nach dem " +"Namen der Klasse in eckigen Klammern angegeben werden. Dies signalisiert " +"statischen Typprüfern, dass es sich um eine generische Klasse handelt. Zur " +"Laufzeit können die Typ-Parameter über das Attribut " +":attr:`~type.__type_params__` der Klasse abgerufen werden. Weitere " +"Informationen finden Sie unter :ref:`generic-classes`." msgid "" "**Programmer's note:** Variables defined in the class definition are class " -"attributes; they are shared by instances. Instance attributes can be set in " -"a method with ``self.name = value``. Both class and instance attributes are " -"accessible through the notation \"``self.name``\", and an instance attribute " -"hides a class attribute with the same name when accessed in this way. Class " -"attributes can be used as defaults for instance attributes, but using " -"mutable values there can lead to unexpected results. :ref:`Descriptors " -"` can be used to create instance variables with different " -"implementation details." -msgstr "" +"attributes; they are shared by instances. Instance attributes can be set in" +" a method with ``self.name = value``. Both class and instance attributes " +"are accessible through the notation \"``self.name``\", and an instance " +"attribute hides a class attribute with the same name when accessed in this " +"way. Class attributes can be used as defaults for instance attributes, but " +"using mutable values there can lead to unexpected results. " +":ref:`Descriptors ` can be used to create instance variables " +"with different implementation details." +msgstr "" +"**Anmerkung für Programmierer:** In der Klassendefinition definierte " +"Variablen sind Klassenattribute; sie werden von allen Instanzen gemeinsam " +"genutzt. Instanzattribute können in einer Methode mit ``self.name = " +"value`` gesetzt werden. Sowohl auf Klassen- als auch auf Instanzattribute " +"kann über die Notation ``self.name`` zugegriffen werden, wobei ein " +"Instanzattribut ein Klassenattribut mit demselben Namen überdeckt, wenn auf " +"diese Weise darauf zugegriffen wird. Klassenattribute können als " +"Standardwerte für Instanzattribute verwendet werden, doch die Verwendung " +"veränderbarer Werte kann zu unerwarteten Ergebnissen führen. " +":ref:`Deskriptoren ` können verwendet werden, um " +"Instanzvariablen mit unterschiedlichen Implementierungsdetails zu erstellen." msgid ":pep:`3115` - Metaclasses in Python 3000" -msgstr "" +msgstr ":pep:`3115` - Metaklassen in Python 3000" msgid "" "The proposal that changed the declaration of metaclasses to the current " "syntax, and the semantics for how classes with metaclasses are constructed." msgstr "" +"Der Vorschlag, durch den die Deklaration von Metaklassen auf die aktuelle " +"Syntax umgestellt wurde, sowie die Semantik hinsichtlich der Konstruktion " +"von Klassen mit Metaklassen." msgid ":pep:`3129` - Class Decorators" -msgstr "" +msgstr ":pep:`3129` - Klassendekoratoren" msgid "" "The proposal that added class decorators. Function and method decorators " "were introduced in :pep:`318`." msgstr "" +"Der Vorschlag, mit dem Klassendekoratoren eingeführt wurden. Funktions- und " +"Methodendekoratoren wurden unter :pep:`318` eingeführt." msgid "Coroutines" -msgstr "" +msgstr "Coroutinen" msgid "Coroutine function definition" -msgstr "" +msgstr "Definition einer Coroutine-Funktion" msgid "" "Execution of Python coroutines can be suspended and resumed at many points " @@ -1604,44 +2340,63 @@ msgid "" "and :keyword:`async with` can only be used in the body of a coroutine " "function." msgstr "" +"Die Ausführung von Python-Coroutinen kann an vielen Stellen unterbrochen und" +" wieder aufgenommen werden (siehe :term:`coroutine`). :keyword:`await` " +"-Ausdrücke, :keyword:`async for` und :keyword:`async with` können nur im " +"Körper einer Coroutine-Funktion verwendet werden." msgid "" "Functions defined with ``async def`` syntax are always coroutine functions, " "even if they do not contain ``await`` or ``async`` keywords." msgstr "" +"Mit der Syntax ``async def`` definierte Funktionen sind immer " +"Coroutinen, auch wenn sie die Schlüsselwörter ``await`` oder ``async``" +" nicht enthalten." msgid "" "It is a :exc:`SyntaxError` to use a ``yield from`` expression inside the " "body of a coroutine function." msgstr "" +"Es ist ein :exc:`SyntaxError`, einen ``yield from`` -Ausdruck im " +"Körper einer Coroutine-Funktion zu verwenden." msgid "An example of a coroutine function::" -msgstr "" +msgstr "Ein Beispiel für eine Coroutine-Funktion::" msgid "" "async def func(param1, param2):\n" " do_stuff()\n" " await some_coroutine()" msgstr "" +"async def func(param1, param2):\n" +" do_stuff()\n" +" await some_coroutine()" msgid "" "``await`` and ``async`` are now keywords; previously they were only treated " "as such inside the body of a coroutine function." msgstr "" +"``await`` und ``async`` sind nun Schlüsselwörter; zuvor wurden sie nur " +"innerhalb des Körpers einer Coroutine-Funktion als solche behandelt." msgid "The :keyword:`!async for` statement" -msgstr "" +msgstr "Die Anweisung :keyword:`!async for`" msgid "" "An :term:`asynchronous iterable` provides an ``__aiter__`` method that " "directly returns an :term:`asynchronous iterator`, which can call " "asynchronous code in its ``__anext__`` method." msgstr "" +"Ein :term:`asynchrones Iterabel` stellt eine Methode ``__aiter__`` " +"bereit, die direkt einen :term:`asynchronen Iterator` zurückgibt, der in " +"seiner Methode ``__anext__`` asynchronen Code aufrufen kann." msgid "" "The ``async for`` statement allows convenient iteration over asynchronous " "iterables." msgstr "" +"Die Anweisung ``async for`` ermöglicht eine bequeme Iteration über " +"asynchrone Iterables." msgid "" "async for TARGET in ITER:\n" @@ -1649,18 +2404,21 @@ msgid "" "else:\n" " SUITE2" msgstr "" +"async for TARGET in ITER:\n" +" SUITE\n" +"else:\n" +" SUITE2" msgid "Is semantically equivalent to::" -msgstr "" +msgstr "Ist semantisch gleichbedeutend mit::" msgid "" -"iter = (ITER)\n" -"iter = type(iter).__aiter__(iter)\n" +"iter = (ITER).__aiter__()\n" "running = True\n" "\n" "while running:\n" " try:\n" -" TARGET = await type(iter).__anext__(iter)\n" +" TARGET = await iter.__anext__()\n" " except StopAsyncIteration:\n" " running = False\n" " else:\n" @@ -1668,34 +2426,56 @@ msgid "" "else:\n" " SUITE2" msgstr "" +"iter = (ITER).__aiter__()\n" +"running = True\n" +"\n" +"while running:\n" +" try:\n" +" TARGET = await iter.__anext__()\n" +" except StopAsyncIteration:\n" +" running = False\n" +" else:\n" +" SUITE\n" +"else:\n" +" SUITE2" msgid "" -"See also :meth:`~object.__aiter__` and :meth:`~object.__anext__` for details." +"except that implicit :ref:`special method lookup ` is used " +"for :meth:`~object.__aiter__` and :meth:`~object.__anext__`." msgstr "" +"mit der Ausnahme, dass für :meth:`~object.__aiter__` und " +":meth:`~object.__anext__` die implizite :ref:`Spezialmethoden-Suche " +"` verwendet wird." msgid "" "It is a :exc:`SyntaxError` to use an ``async for`` statement outside the " "body of a coroutine function." msgstr "" +"Es ist ein :exc:`SyntaxError`, eine ``async for`` -Anweisung " +"außerhalb des Körpers einer Coroutine-Funktion zu verwenden." msgid "The :keyword:`!async with` statement" -msgstr "" +msgstr "Die Anweisung :keyword:`!async with`" msgid "" -"An :term:`asynchronous context manager` is a :term:`context manager` that is " -"able to suspend execution in its *enter* and *exit* methods." +"An :term:`asynchronous context manager` is a :term:`context manager` that is" +" able to suspend execution in its *enter* and *exit* methods." msgstr "" +"Ein :term:`asynchroner Kontextmanager` ist ein :term:`Kontextmanager`, der " +"die Ausführung in seinen *enter*- und *exit*-Methoden unterbrechen kann." msgid "" "async with EXPRESSION as TARGET:\n" " SUITE" msgstr "" +"async mit EXPRESSION als TARGET:\n" +" SUITE" msgid "" "manager = (EXPRESSION)\n" -"aenter = type(manager).__aenter__\n" -"aexit = type(manager).__aexit__\n" -"value = await aenter(manager)\n" +"aenter = manager.__aenter__\n" +"aexit = manager.__aexit__\n" +"value = await aenter()\n" "hit_except = False\n" "\n" "try:\n" @@ -1703,42 +2483,53 @@ msgid "" " SUITE\n" "except:\n" " hit_except = True\n" -" if not await aexit(manager, *sys.exc_info()):\n" +" if not await aexit(*sys.exc_info()):\n" " raise\n" "finally:\n" " if not hit_except:\n" -" await aexit(manager, None, None, None)" +" await aexit(None, None, None)" msgstr "" msgid "" -"See also :meth:`~object.__aenter__` and :meth:`~object.__aexit__` for " -"details." +"except that implicit :ref:`special method lookup ` is used " +"for :meth:`~object.__aenter__` and :meth:`~object.__aexit__`." msgstr "" +"mit der Ausnahme, dass für :meth:`~object.__aenter__` und " +":meth:`~object.__aexit__` die implizite :ref:`Spezialmethoden-Suche " +"` verwendet wird." msgid "" "It is a :exc:`SyntaxError` to use an ``async with`` statement outside the " "body of a coroutine function." msgstr "" +"Es ist ein :exc:`SyntaxError`, eine ``async with`` `-Anweisung " +"außerhalb des Körpers einer Coroutine-Funktion zu verwenden." msgid ":pep:`492` - Coroutines with async and await syntax" -msgstr "" +msgstr ":pep:`492` - Coroutinen mit der \"async\"- und \"await\"-Syntax" msgid "" -"The proposal that made coroutines a proper standalone concept in Python, and " -"added supporting syntax." +"The proposal that made coroutines a proper standalone concept in Python, and" +" added supporting syntax." msgstr "" +"Der Vorschlag, durch den Coroutinen zu einem eigenständigen Konzept in " +"Python wurden und die entsprechende Syntax hinzugefügt wurde." msgid "Type parameter lists" -msgstr "" +msgstr "Typenparameterlisten" msgid "Support for default values was added (see :pep:`696`)." msgstr "" +"Es wurde Unterstützung für Standardwerte hinzugefügt (siehe :pep:`696`)." msgid "" -":ref:`Functions ` (including :ref:`coroutines `), :ref:" -"`classes ` and :ref:`type aliases ` may contain a type " +":ref:`Functions ` (including :ref:`coroutines `), " +":ref:`classes ` and :ref:`type aliases ` may contain a type " "parameter list::" msgstr "" +":ref:`Funktionen ` (einschließlich :ref:`Coroutinen `), " +":ref:`Klassen ` und :ref:`Typalias ` können eine Typ-" +"Parameterliste enthalten::" msgid "" "def max[T](args: list[T]) -> T:\n" @@ -1763,52 +2554,87 @@ msgid "" "type checkers, and at runtime, generic objects behave much like their non-" "generic counterparts." msgstr "" +"Semantisch bedeutet dies, dass die Funktion, Klasse oder der Typalias über " +"eine Typvariable generisch ist. Diese Information wird in erster Linie von " +"statischen Typprüfern verwendet, und zur Laufzeit verhalten sich generische " +"Objekte weitgehend wie ihre nicht-generischen Entsprechungen." msgid "" "Type parameters are declared in square brackets (``[]``) immediately after " "the name of the function, class, or type alias. The type parameters are " "accessible within the scope of the generic object, but not elsewhere. Thus, " -"after a declaration ``def func[T](): pass``, the name ``T`` is not available " -"in the module scope. Below, the semantics of generic objects are described " +"after a declaration ``def func[T](): pass``, the name ``T`` is not available" +" in the module scope. Below, the semantics of generic objects are described " "with more precision. The scope of type parameters is modeled with a special " "function (technically, an :ref:`annotation scope `) that " "wraps the creation of the generic object." msgstr "" +"Typ-Parameter werden in eckigen Klammern (``[]``) unmittelbar nach dem Namen" +" der Funktion, Klasse oder des Typ-Alias deklariert. Auf die Typ-Parameter " +"kann innerhalb des Geltungsbereichs des generischen Objekts zugegriffen " +"werden, anderswo jedoch nicht. Daher ist nach einer Deklaration ``def " +"func[T](): pass`` der Name ``T`` im Modul-Geltungsbereich nicht verfügbar. " +"Im Folgenden wird die Semantik generischer Objekte genauer beschrieben. Der " +"Geltungsbereich von Typ-Parametern wird durch eine spezielle Funktion " +"(technisch gesehen ein :ref:`Annotationsbereich `) " +"modelliert, die die Erstellung des generischen Objekts umschließt." msgid "" -"Generic functions, classes, and type aliases have a :attr:`~definition." -"__type_params__` attribute listing their type parameters." +"Generic functions, classes, and type aliases have a " +":attr:`~definition.__type_params__` attribute listing their type parameters." msgstr "" +"Generische Funktionen, Klassen und Typaliasse verfügen über ein Attribut " +":attr:`~definition.__type_params__`, in dem ihre Typparameter aufgeführt " +"sind." msgid "Type parameters come in three kinds:" -msgstr "" +msgstr "Es gibt drei Arten von Typenparametern:" msgid "" ":data:`typing.TypeVar`, introduced by a plain name (e.g., ``T``). " "Semantically, this represents a single type to a type checker." msgstr "" +":data:`typing.TypeVar`, eingeführt durch einen einfachen Namen (z. B. " +"``T``). Semantisch gesehen stellt dies für einen Typprüfer einen einzelnen " +"Typ dar." msgid "" ":data:`typing.TypeVarTuple`, introduced by a name prefixed with a single " "asterisk (e.g., ``*Ts``). Semantically, this stands for a tuple of any " "number of types." msgstr "" +":data:`typing.TypeVarTuple`, eingeführt durch einen Namen, dem ein einzelnes" +" Sternchen vorangestellt ist (z. B. ``*Ts``). Semantisch steht dies für ein " +"Tupel beliebiger Typen." msgid "" ":data:`typing.ParamSpec`, introduced by a name prefixed with two asterisks " "(e.g., ``**P``). Semantically, this stands for the parameters of a callable." msgstr "" +":data:`typing.ParamSpec`, eingeleitet durch einen Namen, dem zwei Sternchen " +"vorangestellt sind (z. B. ``**P``). Semantisch gesehen steht dies für die " +"Parameter eines aufrufbaren Objekts." msgid "" ":data:`typing.TypeVar` declarations can define *bounds* and *constraints* " "with a colon (``:``) followed by an expression. A single expression after " -"the colon indicates a bound (e.g. ``T: int``). Semantically, this means that " -"the :data:`!typing.TypeVar` can only represent types that are a subtype of " -"this bound. A parenthesized tuple of expressions after the colon indicates a " -"set of constraints (e.g. ``T: (str, bytes)``). Each member of the tuple " +"the colon indicates a bound (e.g. ``T: int``). Semantically, this means that" +" the :data:`!typing.TypeVar` can only represent types that are a subtype of " +"this bound. A parenthesized tuple of expressions after the colon indicates a" +" set of constraints (e.g. ``T: (str, bytes)``). Each member of the tuple " "should be a type (again, this is not enforced at runtime). Constrained type " "variables can only take on one of the types in the list of constraints." msgstr "" +":data:`typing.TypeVar` Deklarationen können *Grenzen* und *Einschränkungen* " +"mit einem Doppelpunkt (``:``) definieren, auf den ein Ausdruck folgt. Ein " +"einzelner Ausdruck nach dem Doppelpunkt bezeichnet eine Grenze (z. B. ``T: " +"int``). Semantisch bedeutet dies, dass die :data:`!typing.TypeVar` nur " +"Typen darstellen kann, die ein Untertyp dieser Grenze sind. Ein in Klammern " +"gesetztes Tupel von Ausdrücken nach dem Doppelpunkt bezeichnet eine Reihe " +"von Einschränkungen (z. B. ``T: (str, bytes)``). Jedes Element des Tupels " +"sollte ein Typ sein (auch dies wird zur Laufzeit nicht erzwungen). " +"Eingeschränkte Typvariablen können nur einen der Typen aus der Liste der " +"Einschränkungen annehmen." msgid "" "For :data:`!typing.TypeVar`\\ s declared using the type parameter list " @@ -1818,28 +2644,50 @@ msgid "" "bounds or constraints are evaluated in a separate :ref:`annotation scope " "`." msgstr "" +"Bei :data:`!typing.TypeVar``s, die unter Verwendung der Typ-" +"Parameterlisten-Syntax deklariert wurden, werden die Grenzen und " +"Einschränkungen nicht bei der Erstellung des generischen Objekts " +"ausgewertet, sondern erst dann, wenn explizit über die Attribute " +"``__bound__`` und ``__constraints__`` auf den Wert zugegriffen wird. Zu" +" diesem Zweck werden die Grenzen bzw. Einschränkungen in einem separaten " +":ref:`Annotationsbereich `` ausgewertet." msgid "" -":data:`typing.TypeVarTuple`\\ s and :data:`typing.ParamSpec`\\ s cannot have " -"bounds or constraints." +":data:`typing.TypeVarTuple`\\ s and :data:`typing.ParamSpec`\\ s cannot have" +" bounds or constraints." msgstr "" +":data:`typing.TypeVarTuple`\\s und :data:`typing.ParamSpec`\\s dürfen keine " +"Begrenzungen oder Einschränkungen aufweisen." msgid "" "All three flavors of type parameters can also have a *default value*, which " -"is used when the type parameter is not explicitly provided. This is added by " -"appending a single equals sign (``=``) followed by an expression. Like the " -"bounds and constraints of type variables, the default value is not evaluated " -"when the object is created, but only when the type parameter's " +"is used when the type parameter is not explicitly provided. This is added by" +" appending a single equals sign (``=``) followed by an expression. Like the " +"bounds and constraints of type variables, the default value is not evaluated" +" when the object is created, but only when the type parameter's " "``__default__`` attribute is accessed. To this end, the default value is " "evaluated in a separate :ref:`annotation scope `. If no " "default value is specified for a type parameter, the ``__default__`` " "attribute is set to the special sentinel object :data:`typing.NoDefault`." msgstr "" +"Alle drei Varianten von Typparametern können zudem einen *Standardwert* " +"haben, der verwendet wird, wenn der Typparameter nicht explizit angegeben " +"wird. Dieser wird durch Anhängen eines einzelnen Gleichheitszeichens " +"(``=``), gefolgt von einem Ausdruck, hinzugefügt. Ähnlich wie die Grenzen " +"und Einschränkungen von Typvariablen wird der Standardwert nicht bei der " +"Erstellung des Objekts ausgewertet, sondern erst, wenn auf das Attribut " +"``__default__`` des Typparameters zugegriffen wird. Zu diesem Zweck wird " +"der Standardwert in einem separaten :ref:`Annotationsbereich ` ausgewertet. Wenn für einen Typparameter kein Standardwert " +"angegeben ist, wird das Attribut ``__default__`` auf das spezielle " +"Sentinel-Objekt :data:`typing.NoDefault` gesetzt." msgid "" "The following example indicates the full set of allowed type parameter " "declarations::" msgstr "" +"Das folgende Beispiel zeigt den vollständigen Satz zulässiger Typ-Parameter-" +"Deklarationen::" msgid "" "def overly_generic[\n" @@ -1859,16 +2707,16 @@ msgid "" msgstr "" msgid "Generic functions" -msgstr "" +msgstr "Generische Funktionen" msgid "Generic functions are declared as follows::" -msgstr "" +msgstr "Generische Funktionen werden wie folgt deklariert::" msgid "def func[T](arg: T): ..." -msgstr "" +msgstr "def func[T](arg: T): ..." msgid "This syntax is equivalent to::" -msgstr "" +msgstr "Diese Syntax entspricht folgendem:" msgid "" "annotation-def TYPE_PARAMS_OF_func():\n" @@ -1883,20 +2731,32 @@ msgid "" "Here ``annotation-def`` indicates an :ref:`annotation scope `, which is not actually bound to any name at runtime. (One other " "liberty is taken in the translation: the syntax does not go through " -"attribute access on the :mod:`typing` module, but creates an instance of :" -"data:`typing.TypeVar` directly.)" +"attribute access on the :mod:`typing` module, but creates an instance of " +":data:`typing.TypeVar` directly.)" msgstr "" +"Hier bezeichnet ``annotation-def`` einen :ref:`Annotationsbereich " +"`, der zur Laufzeit eigentlich an keinen Namen gebunden " +"ist. (Bei der Übersetzung wurde noch eine weitere Freiheit in Anspruch " +"genommen: Die Syntax greift nicht über Attributzugriff auf das Modul " +":mod:`typing` zu, sondern erstellt direkt eine Instanz von " +":data:`typing.TypeVar`.)" msgid "" "The annotations of generic functions are evaluated within the annotation " "scope used for declaring the type parameters, but the function's defaults " "and decorators are not." msgstr "" +"Die Annotationen generischer Funktionen werden innerhalb des " +"Annotationsbereichs ausgewertet, der für die Deklaration der Typparameter " +"verwendet wird; die Standardwerte und Dekoratoren der Funktion hingegen " +"nicht." msgid "" -"The following example illustrates the scoping rules for these cases, as well " -"as for additional flavors of type parameters::" +"The following example illustrates the scoping rules for these cases, as well" +" as for additional flavors of type parameters::" msgstr "" +"Das folgende Beispiel veranschaulicht die Gültigkeitsbereichsregeln für " +"diese Fälle sowie für weitere Varianten von Typparametern::" msgid "" "@decorator\n" @@ -1905,9 +2765,11 @@ msgid "" msgstr "" msgid "" -"Except for the :ref:`lazy evaluation ` of the :class:" -"`~typing.TypeVar` bound, this is equivalent to::" +"Except for the :ref:`lazy evaluation ` of the " +":class:`~typing.TypeVar` bound, this is equivalent to::" msgstr "" +"Abgesehen von der :ref:`verzögerten Auswertung ` der " +"Bindung :class:`~typing.TypeVar` entspricht dies folgendem Ausdruck::" msgid "" "DEFAULT_OF_arg = some_default\n" @@ -1929,20 +2791,40 @@ msgid "" " return func\n" "func = decorator(TYPE_PARAMS_OF_func())" msgstr "" +"DEFAULT_OF_arg = some_default\n" +"\n" +"annotation-def TYPE_PARAMS_OF_func():\n" +"\n" +" annotation-def BOUND_OF_T():\n" +" return int\n" +" # Tatsächlich wird BOUND_OF_T() nur bei Bedarf ausgewertet.\n" +" T = typing.TypeVar(\"T\", bound=BOUND_OF_T())\n" +"\n" +" Ts = typing.TypeVarTuple(\"Ts\")\n" +" P = typing.ParamSpec(\"P\")\n" +"\n" +" def func(*args: *Ts, arg: Callable[P, T] = DEFAULT_OF_arg):\n" +" ...\n" +"\n" +" func.__type_params__ = (T, Ts, P)\n" +" return func\n" +"func = decorator(TYPE_PARAMS_OF_func())" msgid "" "The capitalized names like ``DEFAULT_OF_arg`` are not actually bound at " "runtime." msgstr "" +"Die großgeschriebenen Namen wie ``DEFAULT_OF_arg`` werden zur Laufzeit " +"eigentlich nicht gebunden." msgid "Generic classes" -msgstr "" +msgstr "Generische Klassen" msgid "Generic classes are declared as follows::" -msgstr "" +msgstr "Generische Klassen werden wie folgt deklariert::" msgid "class Bag[T]: ..." -msgstr "" +msgstr "Klasse Bag[T]: ..." msgid "" "annotation-def TYPE_PARAMS_OF_Bag():\n" @@ -1955,10 +2837,13 @@ msgid "" msgstr "" msgid "" -"Here again ``annotation-def`` (not a real keyword) indicates an :ref:" -"`annotation scope `, and the name ``TYPE_PARAMS_OF_Bag`` " -"is not actually bound at runtime." +"Here again ``annotation-def`` (not a real keyword) indicates an " +":ref:`annotation scope `, and the name " +"``TYPE_PARAMS_OF_Bag`` is not actually bound at runtime." msgstr "" +"Auch hier weist ``annotation-def`` (kein echtes Schlüsselwort) auf einen" +" :ref:`Annotationsbereich ` hin, und der Name " +"``TYPE_PARAMS_OF_Bag`` wird zur Laufzeit tatsächlich nicht gebunden." msgid "" "Generic classes implicitly inherit from :data:`typing.Generic`. The base " @@ -1966,14 +2851,21 @@ msgid "" "type scope for the type parameters, and decorators are evaluated outside " "that scope. This is illustrated by this example::" msgstr "" +"Generische Klassen erben implizit von :data:`typing.Generic``. Die " +"Basisklassen und Schlüsselwortargumente generischer Klassen werden innerhalb" +" des Typbereichs für die Typparameter ausgewertet, während Dekoratoren " +"außerhalb dieses Bereichs ausgewertet werden. Dies wird durch das folgende " +"Beispiel veranschaulicht::" msgid "" "@decorator\n" "class Bag(Base[T], arg=T): ..." msgstr "" +"@decorator\n" +"class Bag(Base[T], arg=T): ..." msgid "This is equivalent to::" -msgstr "" +msgstr "Das entspricht folgendem:" msgid "" "annotation-def TYPE_PARAMS_OF_Bag():\n" @@ -1986,20 +2878,24 @@ msgid "" msgstr "" msgid "Generic type aliases" -msgstr "" +msgstr "Generische Typaliase" msgid "" "The :keyword:`type` statement can also be used to create a generic type " "alias::" msgstr "" +"Die Anweisung :keyword:`type` kann auch zum Erstellen eines generischen " +"Typalias verwendet werden::" msgid "type ListOrSet[T] = list[T] | set[T]" -msgstr "" +msgstr "Typ ListOrSet[T] = list[T] | set[T]" msgid "" "Except for the :ref:`lazy evaluation ` of the value, this " "is equivalent to::" msgstr "" +"Abgesehen von der :ref:`verzögerten Auswertung ` des Werts " +"entspricht dies folgendem Ausdruck::" msgid "" "annotation-def TYPE_PARAMS_OF_ListOrSet():\n" @@ -2008,48 +2904,73 @@ msgid "" " annotation-def VALUE_OF_ListOrSet():\n" " return list[T] | set[T]\n" " # In reality, the value is lazily evaluated\n" -" return typing.TypeAliasType(\"ListOrSet\", VALUE_OF_ListOrSet(), " -"type_params=(T,))\n" +" return typing.TypeAliasType(\"ListOrSet\", VALUE_OF_ListOrSet(), type_params=(T,))\n" "ListOrSet = TYPE_PARAMS_OF_ListOrSet()" msgstr "" +"annotation-def TYPE_PARAMS_OF_ListOrSet():\n" +" T = typing.TypeVar(\"T\")\n" +"\n" +" annotation-def VALUE_OF_ListOrSet():\n" +" return list[T] | set[T]\n" +" # Tatsächlich wird der Wert verzögert ausgewertet\n" +" return typing.TypeAliasType(\"ListOrSet\", VALUE_OF_ListOrSet(), type_params=(T,))\n" +"ListOrSet = TYPE_PARAMS_OF_ListOrSet()" msgid "" "Here, ``annotation-def`` (not a real keyword) indicates an :ref:`annotation " "scope `. The capitalized names like " "``TYPE_PARAMS_OF_ListOrSet`` are not actually bound at runtime." msgstr "" +"Hier bezeichnet ``annotation-def`` (kein echtes Schlüsselwort) einen " +":ref:`Annotationsbereich `. Die großgeschriebenen Namen " +"wie ``TYPE_PARAMS_OF_ListOrSet`` werden zur Laufzeit tatsächlich nicht " +"gebunden." msgid "Annotations" -msgstr "" +msgstr "Anmerkungen / Annotations" msgid "Annotations are now lazily evaluated by default." -msgstr "" +msgstr "Annotationen werden nun standardmäßig verzögert ausgewertet." msgid "" "Variables and function parameters may carry :term:`annotations " "`, created by adding a colon after the name, followed by an " "expression::" msgstr "" +"Variablen und Funktionsparameter können :term:`Annotationen ` " +"enthalten, die durch Hinzufügen eines Doppelpunkts hinter dem Namen, gefolgt" +" von einem Ausdruck, erstellt werden::" msgid "" "x: annotation = 1\n" "def f(param: annotation): ..." msgstr "" +"x: annotation = 1\n" +"def f(param: annotation): ..." msgid "Functions may also carry a return annotation following an arrow::" msgstr "" +"Funktionen können auch eine Rückgabeannotation hinter einem Pfeil " +"enthalten::" msgid "def f() -> annotation: ..." -msgstr "" +msgstr "def f() -> annotation: ..." msgid "" "Annotations are conventionally used for :term:`type hints `, but " -"this is not enforced by the language, and in general annotations may contain " -"arbitrary expressions. The presence of annotations does not change the " +"this is not enforced by the language, and in general annotations may contain" +" arbitrary expressions. The presence of annotations does not change the " "runtime semantics of the code, except if some mechanism is used that " -"introspects and uses the annotations (such as :mod:`dataclasses` or :func:" -"`functools.singledispatch`)." +"introspects and uses the annotations (such as :mod:`dataclasses` or " +":deco:`functools.singledispatch`)." msgstr "" +"Annotationen werden üblicherweise für :term:`Typ-Hinweise ` " +"verwendet, dies wird jedoch von der Sprache nicht erzwungen, und im " +"Allgemeinen können Annotationen beliebige Ausdrücke enthalten. Das " +"Vorhandensein von Annotationen ändert nichts an der Laufzeitsemantik des " +"Codes, es sei denn, es wird ein Mechanismus verwendet, der die Annotationen " +"auswertet und nutzt (wie beispielsweise :mod:`dataclasses` oder " +":deco:`functools.singledispatch`)." msgid "" "By default, annotations are lazily evaluated in an :ref:`annotation scope " @@ -2058,11 +2979,21 @@ msgid "" "information that can be used to evaluate the annotation later if requested. " "The :mod:`annotationlib` module provides tools for evaluating annotations." msgstr "" +"Standardmäßig werden Annotationen in einem :ref:`Annotationsbereich " +"` verzögert ausgewertet. Das bedeutet, dass sie nicht " +"ausgewertet werden, wenn der Code, der die Annotation enthält, ausgewertet " +"wird. Stattdessen speichert der Interpreter Informationen, die später bei " +"Bedarf zur Auswertung der Annotation verwendet werden können. Das Modul " +":mod:`annotationlib` stellt Werkzeuge zur Auswertung von Annotationen " +"bereit." msgid "" "If the :ref:`future statement ` ``from __future__ import " "annotations`` is present, all annotations are instead stored as strings::" msgstr "" +"Wenn die :ref:`future-Anweisung ` ``from __future__ import " +"annotations`` vorhanden ist, werden alle Annotationen stattdessen als " +"Zeichenketten gespeichert::" msgid "" ">>> from __future__ import annotations\n" @@ -2070,43 +3001,64 @@ msgid "" ">>> f.__annotations__\n" "{'param': 'annotation'}" msgstr "" +">>> from __future__ import annotations\n" +">>> def f(param: annotation): ...\n" +">>> f.__annotations__\n" +"{'param': 'annotation'}" msgid "" "This future statement will be deprecated and removed in a future version of " -"Python, but not before Python 3.13 reaches its end of life (see :pep:`749`). " -"When it is used, introspection tools like :func:`annotationlib." -"get_annotations` and :func:`typing.get_type_hints` are less likely to be " -"able to resolve annotations at runtime." -msgstr "" +"Python, but not before Python 3.13 reaches its end of life (see :pep:`749`)." +" When it is used, introspection tools like " +":func:`annotationlib.get_annotations` and :func:`typing.get_type_hints` are " +"less likely to be able to resolve annotations at runtime." +msgstr "" +"Diese Zukunftsanweisung wird in einer zukünftigen Version von Python als " +"veraltet markiert und entfernt, jedoch nicht bevor Python 3.13 das Ende " +"seines Lebenszyklus erreicht hat (siehe :pep:`749`). Bei ihrer Verwendung " +"ist es weniger wahrscheinlich, dass Introspektions-Tools wie " +":func:`annotationlib.get_annotations` und :func:`typing.get_type_hints` " +"Annotationen zur Laufzeit auflösen können." msgid "Footnotes" msgstr "Fußnoten" msgid "" -"The exception is propagated to the invocation stack unless there is a :" -"keyword:`finally` clause which happens to raise another exception. That new " -"exception causes the old one to be lost." +"The exception is propagated to the invocation stack unless there is a " +":keyword:`finally` clause which happens to raise another exception. That new" +" exception causes the old one to be lost." msgstr "" +"Die Ausnahme wird an den Aufrufstapel weitergegeben, es sei denn, es liegt " +"eine :keyword:`finally` -Klausel vor, die zufällig eine weitere Ausnahme " +"auslöst. Diese neue Ausnahme führt dazu, dass die alte Ausnahme verloren " +"geht." msgid "In pattern matching, a sequence is defined as one of the following:" msgstr "" +"Beim Musterabgleich wird eine Sequenz als eine der folgenden Möglichkeiten " +"definiert:" msgid "a class that inherits from :class:`collections.abc.Sequence`" -msgstr "" +msgstr "eine Klasse, die von … ableitet :class:`collections.abc.Sequence`" msgid "" "a Python class that has been registered as :class:`collections.abc.Sequence`" msgstr "" +"eine Python-Klasse, die als :class:`collections.abc.Sequence` registriert " +"ist" msgid "" -"a builtin class that has its (CPython) :c:macro:`Py_TPFLAGS_SEQUENCE` bit set" +"a builtin class that has its (CPython) :c:macro:`Py_TPFLAGS_SEQUENCE` bit " +"set" msgstr "" +"eine integrierte Klasse, bei der das (CPython-) " +":c:macro:`Py_TPFLAGS_SEQUENCE` -Bit gesetzt ist" msgid "a class that inherits from any of the above" -msgstr "" +msgstr "eine Klasse, die von einer der oben genannten Klassen abgeleitet ist" msgid "The following standard library classes are sequences:" -msgstr "" +msgstr "Die folgenden Klassen der Standardbibliothek sind Sequenzen:" msgid ":class:`array.array`" msgstr "" @@ -2124,37 +3076,51 @@ msgid "" "Subject values of type ``str``, ``bytes``, and ``bytearray`` do not match " "sequence patterns." msgstr "" +"Subjektwerte vom Typ ``str``, ``bytes`` und ``bytearray`` " +"entsprechen keinen Sequenzmustern." msgid "In pattern matching, a mapping is defined as one of the following:" msgstr "" +"Beim Musterabgleich wird eine Zuordnung als eine der folgenden Möglichkeiten" +" definiert:" msgid "a class that inherits from :class:`collections.abc.Mapping`" -msgstr "" +msgstr "eine Klasse, die von … ableitet :class:`collections.abc.Mapping`" msgid "" "a Python class that has been registered as :class:`collections.abc.Mapping`" -msgstr "" +msgstr "eine Python-Klasse, die als :class:`collections.abc.Mapping`" msgid "" "a builtin class that has its (CPython) :c:macro:`Py_TPFLAGS_MAPPING` bit set" msgstr "" +"eine integrierte Klasse, bei der das (CPython-) " +":c:macro:`Py_TPFLAGS_MAPPING` -Bit gesetzt ist" msgid "" -"The standard library classes :class:`dict` and :class:`types." -"MappingProxyType` are mappings." +"The standard library classes :class:`dict` and " +":class:`types.MappingProxyType` are mappings." msgstr "" +"Die Klassen :class:`dict` und :class:`types.MappingProxyType` aus " +"der Standardbibliothek sind Zuordnungen." msgid "" "A string literal appearing as the first statement in the function body is " "transformed into the function's :attr:`~function.__doc__` attribute and " "therefore the function's :term:`docstring`." msgstr "" +"Ein String-Literal, das als erste Anweisung im Funktionskörper erscheint, " +"wird in das Attribut :attr:`~function.__doc__` der Funktion und damit in" +" den :term:`docstring` der Funktion umgewandelt." msgid "" "A string literal appearing as the first statement in the class body is " "transformed into the namespace's :attr:`~type.__doc__` item and therefore " "the class's :term:`docstring`." msgstr "" +"Ein String-Literal, das als erste Anweisung im Klassenkörper erscheint, wird" +" in das Element :attr:`~type.__doc__` des Namensraums und somit in das " +":term:`docstring` der Klasse umgewandelt." msgid "compound" msgstr "" @@ -2253,7 +3219,7 @@ msgid "module" msgstr "" msgid "sys" -msgstr "sys" +msgstr "" msgid "traceback" msgstr "" @@ -2334,10 +3300,10 @@ msgid "@ (at)" msgstr "" msgid "default" -msgstr "Standard" +msgstr "" msgid "value" -msgstr "Wert" +msgstr "" msgid "argument" msgstr "" From 640ab747020c9e12c30f81a03c5f6a3075bce03a Mon Sep 17 00:00:00 2001 From: JystBreisgau Date: Thu, 20 Aug 2026 15:24:52 +0200 Subject: [PATCH 6/8] Starting translation into German /reference/simple_stmts.po --- reference/simple_stmts.po | 1059 ++++++++++++++++++++++++++++--------- 1 file changed, 802 insertions(+), 257 deletions(-) diff --git a/reference/simple_stmts.po b/reference/simple_stmts.po index 64a374ff..124b368b 100644 --- a/reference/simple_stmts.po +++ b/reference/simple_stmts.po @@ -21,30 +21,42 @@ msgstr "" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" + msgid "Simple statements" -msgstr "" +msgstr "Einfache Aussagen" msgid "" -"A simple statement is comprised within a single logical line. Several simple " -"statements may occur on a single line separated by semicolons. The syntax " +"A simple statement is comprised within a single logical line. Several simple" +" statements may occur on a single line separated by semicolons. The syntax " "for simple statements is:" msgstr "" +"Eine einfache Anweisung besteht aus einer einzigen logischen Zeile. In einer" +" Zeile können mehrere einfache Anweisungen vorkommen, die durch Semikolons " +"voneinander getrennt sind. Die Syntax für einfache Anweisungen lautet:" msgid "Expression statements" -msgstr "" +msgstr "Ausdrucksanweisungen" msgid "" -"Expression statements are used (mostly interactively) to compute and write a " -"value, or (usually) to call a procedure (a function that returns no " +"Expression statements are used (mostly interactively) to compute and write a" +" value, or (usually) to call a procedure (a function that returns no " "meaningful result; in Python, procedures return the value ``None``). Other " "uses of expression statements are allowed and occasionally useful. The " "syntax for an expression statement is:" msgstr "" +"Ausdrucksanweisungen werden (meist interaktiv) verwendet, um einen Wert zu " +"berechnen und auszugeben oder (in der Regel) um eine Prozedur aufzurufen " +"(eine Funktion, die kein aussagekräftiges Ergebnis zurückgibt; in Python " +"geben Prozeduren den Wert ``None`` zurück). Andere Verwendungszwecke von" +" Ausdrucksanweisungen sind zulässig und gelegentlich nützlich. Die Syntax " +"für eine Ausdrucksanweisung lautet:" msgid "" -"An expression statement evaluates the expression list (which may be a single " -"expression)." +"An expression statement evaluates the expression list (which may be a single" +" expression)." msgstr "" +"Eine Ausdrucksanweisung wertet die Ausdrucksliste aus (die aus einem " +"einzigen Ausdruck bestehen kann)." msgid "" "In interactive mode, if the value is not ``None``, it is converted to a " @@ -52,19 +64,28 @@ msgid "" "written to standard output on a line by itself (except if the result is " "``None``, so that procedure calls do not cause any output.)" msgstr "" +"Im interaktiven Modus wird der Wert, sofern er nicht ``None`` lautet, " +"mithilfe der integrierten Funktion :func:`repr` in eine Zeichenkette " +"umgewandelt, und die resultierende Zeichenkette wird in einer eigenen Zeile " +"in die Standardausgabe geschrieben (es sei denn, das Ergebnis lautet " +"``None``, sodass Prozeduraufrufe keine Ausgabe verursachen)." msgid "Assignment statements" -msgstr "" +msgstr "Zuweisungsanweisungen" msgid "" "Assignment statements are used to (re)bind names to values and to modify " "attributes or items of mutable objects:" msgstr "" +"Zuweisungsanweisungen dienen dazu, Namen (erneut) mit Werten zu verknüpfen " +"und Attribute oder Elemente veränderbarer Objekte zu ändern:" msgid "" -"(See section :ref:`primaries` for the syntax definitions for *attributeref*, " -"*subscription*, and *slicing*.)" +"(See section :ref:`primaries` for the syntax definitions for *attributeref* " +"and *subscription*.)" msgstr "" +"(Die Syntaxdefinitionen für *attributeref* und *subscription* finden Sie im " +"Abschnitt :ref:`primaries` .)" msgid "" "An assignment statement evaluates the expression list (remember that this " @@ -72,89 +93,148 @@ msgid "" "tuple) and assigns the single resulting object to each of the target lists, " "from left to right." msgstr "" +"Eine Zuweisungsanweisung wertet die Ausdrucksliste aus (beachten Sie, dass " +"es sich dabei um einen einzelnen Ausdruck oder eine durch Kommas getrennte " +"Liste handeln kann, wobei Letztere ein Tupel ergibt) und weist das einzelne " +"resultierende Objekt nacheinander von links nach rechts jeder der Ziellisten" +" zu." msgid "" "Assignment is defined recursively depending on the form of the target " -"(list). When a target is part of a mutable object (an attribute reference, " -"subscription or slicing), the mutable object must ultimately perform the " -"assignment and decide about its validity, and may raise an exception if the " -"assignment is unacceptable. The rules observed by various types and the " -"exceptions raised are given with the definition of the object types (see " -"section :ref:`types`)." +"(list). When a target is part of a mutable object (an attribute reference or" +" subscription), the mutable object must ultimately perform the assignment " +"and decide about its validity, and may raise an exception if the assignment " +"is unacceptable. The rules observed by various types and the exceptions " +"raised are given with the definition of the object types (see section " +":ref:`types`)." msgstr "" +"Die Zuweisung wird rekursiv in Abhängigkeit von der Form des Ziels (Liste) " +"definiert. Ist ein Ziel Teil eines veränderbaren Objekts (eine " +"Attributreferenz oder ein Abonnement), muss das veränderbare Objekt " +"letztendlich die Zuweisung durchführen und über deren Gültigkeit " +"entscheiden; es kann eine Ausnahme auslösen, wenn die Zuweisung unzulässig " +"ist. Die von den verschiedenen Typen beachteten Regeln und die ausgelösten " +"Ausnahmen sind in der Definition der Objekttypen angegeben (siehe Abschnitt " +":ref:`types`)." msgid "" -"Assignment of an object to a target list, optionally enclosed in parentheses " -"or square brackets, is recursively defined as follows." +"Assignment of an object to a target list, optionally enclosed in parentheses" +" or square brackets, is recursively defined as follows." msgstr "" +"Die Zuordnung eines Objekts zu einer Zielliste, die optional in runde oder " +"eckige Klammern gesetzt ist, wird rekursiv wie folgt definiert." msgid "" "If the target list is a single target with no trailing comma, optionally in " "parentheses, the object is assigned to that target." msgstr "" +"Wenn die Zielliste aus einem einzelnen Ziel ohne abschließendes Komma " +"besteht, das optional in Klammern steht, wird das Objekt diesem Ziel " +"zugewiesen." msgid "Else:" -msgstr "" +msgstr "Sonst:" msgid "" "If the target list contains one target prefixed with an asterisk, called a " "\"starred\" target: The object must be an iterable with at least as many " "items as there are targets in the target list, minus one. The first items " "of the iterable are assigned, from left to right, to the targets before the " -"starred target. The final items of the iterable are assigned to the targets " -"after the starred target. A list of the remaining items in the iterable is " -"then assigned to the starred target (the list can be empty)." -msgstr "" +"starred target. The final items of the iterable are assigned to the targets" +" after the starred target. A list of the remaining items in the iterable is" +" then assigned to the starred target (the list can be empty)." +msgstr "" +"Wenn die Zielliste ein Ziel enthält, dem ein Sternchen vorangestellt ist " +"(ein sogenanntes \"mit Sternchen markiertes\"; Ziel): Das Objekt muss eine " +"iterierbare Struktur sein, die mindestens so viele Elemente enthält, wie es " +"Ziele in der Zielliste gibt, minus eins. Die ersten Elemente des " +"iterierbaren Objekts werden von links nach rechts den Zielen vor dem mit " +"einem Sternchen gekennzeichneten Ziel zugewiesen. Die letzten Elemente des " +"iterierbaren Objekts werden den Zielen nach dem mit einem Sternchen " +"gekennzeichneten Ziel zugewiesen. Anschließend wird dem mit einem Sternchen " +"gekennzeichneten Ziel eine Liste der verbleibenden Elemente des iterierbaren" +" Objekts zugewiesen (die Liste kann leer sein)." msgid "" "Else: The object must be an iterable with the same number of items as there " "are targets in the target list, and the items are assigned, from left to " "right, to the corresponding targets." msgstr "" +"Andernfalls: Das Objekt muss eine iterierbare Struktur sein, deren Anzahl an" +" Elementen der Anzahl der Ziele in der Zielliste entspricht, und die " +"Elemente werden von links nach rechts den entsprechenden Zielen zugewiesen." msgid "" -"Assignment of an object to a single target is recursively defined as follows." +"Assignment of an object to a single target is recursively defined as " +"follows." msgstr "" +"Die Zuordnung eines Objekts zu einem einzelnen Ziel wird rekursiv wie folgt " +"definiert." msgid "If the target is an identifier (name):" -msgstr "" +msgstr "Wenn das Ziel ein Bezeichner (Name) ist:" msgid "" "If the name does not occur in a :keyword:`global` or :keyword:`nonlocal` " "statement in the current code block: the name is bound to the object in the " "current local namespace." msgstr "" +"Wenn der Name in keinem :keyword:`global` - oder :keyword:`nonlocal` " +"-Befehl im aktuellen Codeblock vorkommt, wird der Name an das Objekt im " +"aktuellen lokalen Namensraum gebunden." msgid "" "Otherwise: the name is bound to the object in the global namespace or the " "outer namespace determined by :keyword:`nonlocal`, respectively." msgstr "" +"Andernfalls: Der Name ist an das Objekt im globalen Namensraum bzw. in dem " +"durch :keyword:`nonlocal` festgelegten äußeren Namensraum gebunden." msgid "" "The name is rebound if it was already bound. This may cause the reference " -"count for the object previously bound to the name to reach zero, causing the " -"object to be deallocated and its destructor (if it has one) to be called." +"count for the object previously bound to the name to reach zero, causing the" +" object to be deallocated and its destructor (if it has one) to be called." msgstr "" +"Der Name wird neu gebunden, falls er bereits gebunden war. Dies kann dazu " +"führen, dass die Referenzanzahl für das zuvor an diesen Namen gebundene " +"Objekt auf Null sinkt, wodurch das Objekt freigegeben und sein Destruktor " +"(sofern vorhanden) aufgerufen wird." msgid "" "If the target is an attribute reference: The primary expression in the " "reference is evaluated. It should yield an object with assignable " "attributes; if this is not the case, :exc:`TypeError` is raised. That " "object is then asked to assign the assigned object to the given attribute; " -"if it cannot perform the assignment, it raises an exception (usually but not " -"necessarily :exc:`AttributeError`)." +"if it cannot perform the assignment, it raises an exception (usually but not" +" necessarily :exc:`AttributeError`)." msgstr "" +"Wenn das Ziel eine Attributreferenz ist: Der primäre Ausdruck in der " +"Referenz wird ausgewertet. Er sollte ein Objekt mit zuweisbaren Attributen " +"ergeben; ist dies nicht der Fall, wird die Ausnahme :exc:`TypeError` " +"ausgelöst. Dieses Objekt wird dann aufgefordert, das zugewiesene Objekt dem " +"angegebenen Attribut zuzuweisen; kann es die Zuweisung nicht durchführen, " +"löst es eine Ausnahme aus (in der Regel, aber nicht zwangsläufig " +":exc:`AttributeError` )." msgid "" "Note: If the object is a class instance and the attribute reference occurs " "on both sides of the assignment operator, the right-hand side expression, " -"``a.x`` can access either an instance attribute or (if no instance attribute " -"exists) a class attribute. The left-hand side target ``a.x`` is always set " -"as an instance attribute, creating it if necessary. Thus, the two " +"``a.x`` can access either an instance attribute or (if no instance attribute" +" exists) a class attribute. The left-hand side target ``a.x`` is always set" +" as an instance attribute, creating it if necessary. Thus, the two " "occurrences of ``a.x`` do not necessarily refer to the same attribute: if " "the right-hand side expression refers to a class attribute, the left-hand " "side creates a new instance attribute as the target of the assignment::" msgstr "" +"Hinweis: Handelt es sich bei dem Objekt um eine Klasseninstanz und erscheint" +" die Attributreferenz auf beiden Seiten des Zuweisungsoperators, kann der " +"Ausdruck auf der rechten Seite, ``a.x``, entweder auf ein Instanzattribut " +"oder (falls kein Instanzattribut vorhanden ist) auf ein Klassenattribut " +"zugreifen. Das Ziel auf der linken Seite, ``a.x`` `, wird immer als " +"Instanzattribut gesetzt und bei Bedarf angelegt. Daher beziehen sich die " +"beiden Vorkommen von ``a.x`` nicht unbedingt auf dasselbe Attribut: Wenn" +" sich der Ausdruck auf der rechten Seite auf ein Klassenattribut bezieht, " +"legt die linke Seite ein neues Instanzattribut als Ziel der Zuweisung an::" msgid "" "class Cls:\n" @@ -165,25 +245,49 @@ msgstr "" msgid "" "This description does not necessarily apply to descriptor attributes, such " -"as properties created with :func:`property`." +"as properties created with :deco:`property`." msgstr "" +"Diese Beschreibung gilt nicht unbedingt für Deskriptorattribute, wie " +"beispielsweise Eigenschaften, die mit :deco:`property`` erstellt wurden." msgid "" "If the target is a subscription: The primary expression in the reference is " -"evaluated. It should yield either a mutable sequence object (such as a " -"list) or a mapping object (such as a dictionary). Next, the subscript " -"expression is evaluated." +"evaluated. Next, the subscript expression is evaluated. Then, the primary's " +":meth:`~object.__setitem__` method is called with two arguments: the " +"subscript and the assigned object." msgstr "" +"Wenn es sich bei dem Ziel um ein Abonnement handelt: Der primäre Ausdruck in" +" der Referenz wird ausgewertet. Anschließend wird der Indexausdruck " +"ausgewertet. Danach wird die Methode :meth:`~object.__setitem__` des " +"primären Ausdrucks mit zwei Argumenten aufgerufen: dem Index und dem " +"zugewiesenen Objekt." + +msgid "" +"Typically, :meth:`~object.__setitem__` is defined on mutable sequence " +"objects (such as lists) and mapping objects (such as dictionaries), and " +"behaves as follows." +msgstr "" +"In der Regel ist :meth:`~object.__setitem__` für veränderbare " +"Sequenzobjekte (wie Listen) und Zuordnungsobjekte (wie Wörterbücher) " +"definiert und verhält sich wie folgt." msgid "" "If the primary is a mutable sequence object (such as a list), the subscript " -"must yield an integer. If it is negative, the sequence's length is added to " -"it. The resulting value must be a nonnegative integer less than the " +"must yield an integer. If it is negative, the sequence's length is added to" +" it. The resulting value must be a nonnegative integer less than the " "sequence's length, and the sequence is asked to assign the assigned object " -"to its item with that index. If the index is out of range, :exc:" -"`IndexError` is raised (assignment to a subscripted sequence cannot add new " -"items to a list)." +"to its item with that index. If the index is out of range, " +":exc:`IndexError` is raised (assignment to a subscripted sequence cannot add" +" new items to a list)." msgstr "" +"Wenn das Primärobjekt ein veränderbliches Sequenzobjekt (wie beispielsweise " +"eine Liste) ist, muss der Index eine ganze Zahl ergeben. Ist er negativ, " +"wird die Länge der Sequenz dazu addiert. Der resultierende Wert muss eine " +"nicht-negative Ganzzahl sein, die kleiner ist als die Länge der Sequenz, und" +" die Sequenz wird aufgefordert, das zugewiesene Objekt ihrem Element mit " +"diesem Index zuzuweisen. Liegt der Index außerhalb des zulässigen Bereichs," +" wird eine Ausnahmel :exc:`IndexError` ausgelöst (die Zuweisung zu einer " +"indizierten Sequenz darf keine neuen Elemente zu einer Liste hinzufügen)." msgid "" "If the primary is a mapping object (such as a dictionary), the subscript " @@ -193,39 +297,53 @@ msgid "" "the same key value, or insert a new key/value pair (if no key with the same " "value existed)." msgstr "" - -msgid "" -"For user-defined objects, the :meth:`~object.__setitem__` method is called " -"with appropriate arguments." -msgstr "" - -msgid "" -"If the target is a slicing: The primary expression in the reference is " -"evaluated. It should yield a mutable sequence object (such as a list). The " -"assigned object should be a sequence object of the same type. Next, the " -"lower and upper bound expressions are evaluated, insofar they are present; " -"defaults are zero and the sequence's length. The bounds should evaluate to " -"integers. If either bound is negative, the sequence's length is added to " -"it. The resulting bounds are clipped to lie between zero and the sequence's " -"length, inclusive. Finally, the sequence object is asked to replace the " -"slice with the items of the assigned sequence. The length of the slice may " -"be different from the length of the assigned sequence, thus changing the " -"length of the target sequence, if the target sequence allows it." -msgstr "" - -msgid "" -"In the current implementation, the syntax for targets is taken to be the " -"same as for expressions, and invalid syntax is rejected during the code " -"generation phase, causing less detailed error messages." -msgstr "" - -msgid "" -"Although the definition of assignment implies that overlaps between the left-" -"hand side and the right-hand side are 'simultaneous' (for example ``a, b = " -"b, a`` swaps two variables), overlaps *within* the collection of assigned-to " -"variables occur left-to-right, sometimes resulting in confusion. For " -"instance, the following program prints ``[0, 2]``::" -msgstr "" +"Wenn es sich bei dem Primärwert um ein Zuordnungsobjekt (z. B. ein " +"Wörterbuch) handelt, muss der Index einen Typ haben, der mit dem " +"Schlüsseltyp der Zuordnung kompatibel ist, und die Zuordnung wird dann " +"aufgefordert, ein Schlüssel-Wert-Paar zu erstellen, das den Index dem " +"zugewiesenen Objekt zuordnet. Dies kann entweder ein vorhandenes Schlüssel-" +"Wert-Paar mit demselben Schlüsselwert ersetzen oder ein neues Schlüssel-" +"Wert-Paar einfügen (sofern kein Schlüssel mit demselben Wert existierte)." + +msgid "" +"If the target is a slicing: The primary expression should evaluate to a " +"mutable sequence object (such as a list). The assigned object should be " +":term:`iterable`. The slicing's lower and upper bounds should be integers; " +"if they are ``None`` (or not present), the defaults are zero and the " +"sequence's length. If either bound is negative, the sequence's length is " +"added to it. The resulting bounds are clipped to lie between zero and the " +"sequence's length, inclusive. Finally, the sequence object is asked to " +"replace the slice with the items of the assigned sequence. The length of " +"the slice may be different from the length of the assigned sequence, thus " +"changing the length of the target sequence, if the target sequence allows " +"it." +msgstr "" +"Wenn das Ziel ein Slicing ist: Der primäre Ausdruck sollte zu einem " +"veränderbaren Sequenzobjekt (z. B. einer Liste) ausgewertet werden. Das " +"zuweisende Objekt sollte :term:`iterable` sein. Die untere und obere Grenze " +"des Slicings sollten Ganzzahlen sein; sind sie ``None`` (oder fehlen ganz), " +"gelten die Standardwerte Null bzw. die Länge der Sequenz. Ist eine der " +"Grenzen negativ, wird die Länge der Sequenz dazu addiert. Die " +"resultierenden Grenzen werden so beschnitten, dass sie zwischen Null und der" +" Länge der Sequenz liegen (einschließlich). Schließlich wird das " +"Sequenzobjekt aufgefordert, den Ausschnitt durch die Elemente der " +"zugewiesenen Sequenz zu ersetzen. Die Länge des Ausschnitts kann von der " +"Länge der zugewiesenen Sequenz abweichen, wodurch sich die Länge der " +"Zielsequenz ändert, sofern die Zielsequenz dies zulässt." + +msgid "" +"Although the definition of assignment implies that overlaps between the " +"left-hand side and the right-hand side are 'simultaneous' (for example ``a, " +"b = b, a`` swaps two variables), overlaps *within* the collection of " +"assigned-to variables occur left-to-right, sometimes resulting in confusion." +" For instance, the following program prints ``[0, 2]``::" +msgstr "" +"Obwohl die Definition der Zuweisung impliziert, dass Überschneidungen " +"zwischen der linken und der rechten Seite \"gleichzeitig\"; stattfinden " +"(beispielsweise tauscht ``a, b = b, a`` zwei Variablen aus), erfolgen " +"Überschneidungen *innerhalb* der Menge der Variablen, denen Werte zugewiesen" +" werden, von links nach rechts, was manchmal zu Verwirrung führt. So gibt " +"beispielsweise das folgende Programm ``[0, 2]`` aus ::" msgid "" "x = [0, 1]\n" @@ -235,142 +353,212 @@ msgid "" msgstr "" msgid ":pep:`3132` - Extended Iterable Unpacking" -msgstr "" +msgstr ":pep:`3132` - Erweitertes Entpacken von Iterables" msgid "The specification for the ``*target`` feature." -msgstr "" +msgstr "Die Spezifikation für die Funktion ``*target`` ." msgid "Augmented assignment statements" -msgstr "" +msgstr "Erweiterte Zuweisungsanweisungen" msgid "" "Augmented assignment is the combination, in a single statement, of a binary " "operation and an assignment statement:" msgstr "" +"Eine erweiterte Zuweisung ist die Kombination einer binären Operation und " +"einer Zuweisungsanweisung in einer einzigen Anweisung:" msgid "" "(See section :ref:`primaries` for the syntax definitions of the last three " "symbols.)" msgstr "" +"(Die Syntaxdefinitionen der letzten drei Symbole finden Sie im Abschnitt " +":ref:`primaries` .)" msgid "" "An augmented assignment evaluates the target (which, unlike normal " "assignment statements, cannot be an unpacking) and the expression list, " "performs the binary operation specific to the type of assignment on the two " -"operands, and assigns the result to the original target. The target is only " -"evaluated once." +"operands, and assigns the result to the original target. The target is only" +" evaluated once." msgstr "" +"Bei einer erweiterten Zuweisung werden das Ziel (das im Gegensatz zu " +"normalen Zuweisungsanweisungen kein Entpacken sein darf) und die " +"Ausdrucksliste ausgewertet, die für den Zuweisungstyp spezifische binäre " +"Operation auf die beiden Operanden angewendet und das Ergebnis dem " +"ursprünglichen Ziel zugewiesen. Das Ziel wird nur einmal ausgewertet." msgid "" "An augmented assignment statement like ``x += 1`` can be rewritten as ``x = " -"x + 1`` to achieve a similar, but not exactly equal effect. In the augmented " -"version, ``x`` is only evaluated once. Also, when possible, the actual " +"x + 1`` to achieve a similar, but not exactly equal effect. In the augmented" +" version, ``x`` is only evaluated once. Also, when possible, the actual " "operation is performed *in-place*, meaning that rather than creating a new " "object and assigning that to the target, the old object is modified instead." msgstr "" +"Eine erweiterte Zuweisungsanweisung wie ``x += 1`` lässt sich als ``x " +"= x + 1`` umschreiben, um einen ähnlichen, wenn auch nicht exakt gleichen " +"Effekt zu erzielen. In der erweiterten Version wird ``x`` nur einmal " +"ausgewertet. Außerdem wird die eigentliche Operation, sofern möglich, *in-" +"place* ausgeführt, was bedeutet, dass nicht ein neues Objekt erstellt und " +"diesem dem Ziel zugewiesen wird, sondern stattdessen das alte Objekt " +"geändert wird." msgid "" -"Unlike normal assignments, augmented assignments evaluate the left-hand side " -"*before* evaluating the right-hand side. For example, ``a[i] += f(x)`` " +"Unlike normal assignments, augmented assignments evaluate the left-hand side" +" *before* evaluating the right-hand side. For example, ``a[i] += f(x)`` " "first looks-up ``a[i]``, then it evaluates ``f(x)`` and performs the " "addition, and lastly, it writes the result back to ``a[i]``." msgstr "" +"Im Gegensatz zu normalen Zuweisungen wird bei erweiterten Zuweisungen die " +"linke Seite *vor* der rechten Seite ausgewertet. Beispielsweise wird bei " +"``a[i] += f(x)`` zunächst ``a[i]`` nachgeschlagen, anschließend wird " +" ``f(x)`` ausgewertet und die Addition durchgeführt, und schließlich wird " +"das Ergebnis wieder in ``a[i]`` geschrieben." msgid "" "With the exception of assigning to tuples and multiple targets in a single " -"statement, the assignment done by augmented assignment statements is handled " -"the same way as normal assignments. Similarly, with the exception of the " +"statement, the assignment done by augmented assignment statements is handled" +" the same way as normal assignments. Similarly, with the exception of the " "possible *in-place* behavior, the binary operation performed by augmented " "assignment is the same as the normal binary operations." msgstr "" +"Mit Ausnahme der Zuweisung an Tupel und mehrere Ziele in einer einzigen " +"Anweisung wird die durch erweiterte Zuweisungsanweisungen vorgenommene " +"Zuweisung genauso behandelt wie normale Zuweisungen. Ebenso entspricht die " +"durch erweiterte Zuweisungsanweisungen ausgeführte binäre Operation – mit " +"Ausnahme des möglichen *In-Place*-Verhaltens – den normalen binären " +"Operationen." msgid "" "For targets which are attribute references, the same :ref:`caveat about " "class and instance attributes ` applies as for regular " "assignments." msgstr "" +"Für Ziele, bei denen es sich um Attributverweise handelt, gilt dieselbe " +":ref:`Einschränkung bezüglich Klassen- und Instanzattributen ` wie bei regulären Zuweisungen." msgid "Annotated assignment statements" -msgstr "" +msgstr "Kommentierte Zuweisungsanweisungen" msgid "" -":term:`Annotation ` assignment is the combination, in a " -"single statement, of a variable or attribute annotation and an optional " +":term:`Annotation ` assignment is the combination, in a" +" single statement, of a variable or attribute annotation and an optional " "assignment statement:" msgstr "" +":term:`Annotations `-Zuweisung ist die Kombination " +"einer Variablen- oder Attribut-Annotation mit einer optionalen " +"Zuweisungsanweisung in einer einzigen Anweisung:" msgid "" -"The difference from normal :ref:`assignment` is that only a single target is " -"allowed." +"The difference from normal :ref:`assignment` is that only a single target is" +" allowed." msgstr "" +"Der Unterschied zu :ref:`assignment` besteht darin, dass nur ein " +"einziges Ziel zulässig ist." msgid "" "The assignment target is considered \"simple\" if it consists of a single " "name that is not enclosed in parentheses. For simple assignment targets, if " -"in class or module scope, the annotations are gathered in a lazily " -"evaluated :ref:`annotation scope `. The annotations can " -"be evaluated using the :attr:`~object.__annotations__` attribute of a class " -"or module, or using the facilities in the :mod:`annotationlib` module." +"in class or module scope, the annotations are gathered in a lazily evaluated" +" :ref:`annotation scope `. The annotations can be " +"evaluated using the :attr:`~object.__annotations__` attribute of a class or " +"module, or using the facilities in the :mod:`annotationlib` module." msgstr "" +"Das Zuweisungsziel gilt als \"einfach\". wenn es aus einem einzigen Namen " +"besteht, der nicht in Klammern steht. Bei einfachen Zuweisungszielen werden " +"die Annotationen, sofern sie sich im Klassen- oder Modulbereich befinden, in" +" einem verzögert ausgewerteten :ref:`Annotationsbereich `" +" gesammelt. Die Annotationen können mithilfe des Attributs " +":attr:`~object.__annotations__` einer Klasse oder eines Moduls oder mithilfe" +" der Funktionen im Modul :mod:`annotationlib` ausgewertet werden." msgid "" "If the assignment target is not simple (an attribute, subscript node, or " "parenthesized name), the annotation is never evaluated." msgstr "" +"Wenn das Zuweisungsziel kein einfaches Element ist (ein Attribut, ein " +"Indexknoten oder ein Name in Klammern), wird die Annotation niemals " +"ausgewertet." msgid "" -"If a name is annotated in a function scope, then this name is local for that " -"scope. Annotations are never evaluated and stored in function scopes." +"If a name is annotated in a function scope, then this name is local for that" +" scope. Annotations are never evaluated and stored in function scopes." msgstr "" +"Wird ein Name in einem Funktionsbereich mit einer Annotation versehen, so " +"ist dieser Name für diesen Bereich lokal. Annotationen werden in " +"Funktionsbereichen niemals ausgewertet und gespeichert." msgid "" "If the right hand side is present, an annotated assignment performs the " "actual assignment as if there was no annotation present. If the right hand " -"side is not present for an expression target, then the interpreter evaluates " -"the target except for the last :meth:`~object.__setitem__` or :meth:`~object." -"__setattr__` call." +"side is not present for an expression target, then the interpreter evaluates" +" the target except for the last :meth:`~object.__setitem__` or " +":meth:`~object.__setattr__` call." msgstr "" +"Ist die rechte Seite vorhanden, führt eine kommentierte Zuweisung die " +"eigentliche Zuweisung so durch, als wäre kein Kommentar vorhanden. Ist die " +"rechte Seite für ein Ausdrucksziel nicht vorhanden, wertet der Interpreter " +"das Ziel aus, mit Ausnahme des letzten Aufrufs von " +":meth:`~object.__setitem__` oder :meth:`~object.__setattr__` ." msgid ":pep:`526` - Syntax for Variable Annotations" -msgstr "" +msgstr ":pep:`526` - Syntax für Variablenanmerkungen" msgid "" "The proposal that added syntax for annotating the types of variables " "(including class variables and instance variables), instead of expressing " "them through comments." msgstr "" +"Der Vorschlag, der eine Syntax zur Annotation der Typen von Variablen " +"(einschließlich Klassen- und Instanzvariablen) einführte, anstatt diese über" +" Kommentare auszudrücken." msgid ":pep:`484` - Type hints" -msgstr "" +msgstr ":pep:`484` - Typhinweise" msgid "" "The proposal that added the :mod:`typing` module to provide a standard " "syntax for type annotations that can be used in static analysis tools and " "IDEs." msgstr "" +"Der Vorschlag, mit dem das Modul :mod:`typing` hinzugefügt wurde, um " +"eine Standardsyntax für Typannotationen bereitzustellen, die in statischen " +"Analysewerkzeugen und IDEs verwendet werden kann." msgid "" "Now annotated assignments allow the same expressions in the right hand side " "as regular assignments. Previously, some expressions (like un-parenthesized " "tuple expressions) caused a syntax error." msgstr "" +"Bei kommentierten Zuweisungen sind nun dieselben Ausdrücke auf der rechten " +"Seite zulässig wie bei regulären Zuweisungen. Bisher führten einige " +"Ausdrücke (wie beispielsweise Tupelausdrücke ohne Klammern) zu einem " +"Syntaxfehler." msgid "" "Annotations are now lazily evaluated in a separate :ref:`annotation scope " "`. If the assignment target is not simple, annotations " "are never evaluated." msgstr "" +"Annotationen werden nun verzögert in einem separaten " +":ref:`Annotationsbereich ` ausgewertet. Ist das " +"Zuweisungsziel nicht einfach, werden Annotationen niemals ausgewertet." msgid "The :keyword:`!assert` statement" -msgstr "" +msgstr "Die :keyword:`!assert` Anweisung" msgid "" -"Assert statements are a convenient way to insert debugging assertions into a " -"program:" +"Assert statements are a convenient way to insert debugging assertions into a" +" program:" msgstr "" +"\"Assert\"-Anweisungen sind eine praktische Möglichkeit, Debugging-Prüfungen " +"in ein Programm einzufügen:" msgid "The simple form, ``assert expression``, is equivalent to ::" msgstr "" +"Die einfache Form ``assert expression`` entspricht folgendem Ausdruck: " +"::" msgid "" "if __debug__:\n" @@ -380,6 +568,7 @@ msgstr "" msgid "" "The extended form, ``assert expression1, expression2``, is equivalent to ::" msgstr "" +"Die erweiterte Form ``assert expression1, expression2`` entspricht ::" msgid "" "if __debug__:\n" @@ -389,28 +578,43 @@ msgstr "" msgid "" "These equivalences assume that :const:`__debug__` and :exc:`AssertionError` " "refer to the built-in variables with those names. In the current " -"implementation, the built-in variable ``__debug__`` is ``True`` under normal " -"circumstances, ``False`` when optimization is requested (command line " -"option :option:`-O`). The current code generator emits no code for an :" -"keyword:`assert` statement when optimization is requested at compile time. " -"Note that it is unnecessary to include the source code for the expression " +"implementation, the built-in variable ``__debug__`` is ``True`` under normal" +" circumstances, ``False`` when optimization is requested (command line " +"option :option:`-O`). The current code generator emits no code for an " +":keyword:`assert` statement when optimization is requested at compile time." +" Note that it is unnecessary to include the source code for the expression " "that failed in the error message; it will be displayed as part of the stack " "trace." msgstr "" +"Diese Äquivalenzen setzen voraus, dass sich :const:`__debug__` und " +":exc:`AssertionError` auf die eingebauten Variablen mit diesen Namen " +"beziehen. In der aktuellen Implementierung ist die eingebaute Variable " +"``__debug__`` unter normalen Umständen ``True`` und ``False``, wenn eine " +"Optimierung angefordert wird (Befehlszeilenoption :option:`-O`). Der " +"aktuelle Codegenerator erzeugt keinen Code für eine :keyword:`assert` " +"-Anweisung, wenn die Optimierung zur Kompilierungszeit angefordert wird. " +"Beachten Sie, dass es nicht erforderlich ist, den Quellcode für den " +"fehlgeschlagenen Ausdruck in die Fehlermeldung aufzunehmen; dieser wird als " +"Teil des Stack-Traces angezeigt." msgid "" "Assignments to :const:`__debug__` are illegal. The value for the built-in " "variable is determined when the interpreter starts." msgstr "" +"Zuweisungen an :const:`__debug__` sind unzulässig. Der Wert der " +"integrierten Variablen wird beim Start des Interpreters festgelegt." msgid "The :keyword:`!pass` statement" -msgstr "" +msgstr "Die :keyword:`!pass` Anweisung" msgid "" ":keyword:`pass` is a null operation --- when it is executed, nothing " "happens. It is useful as a placeholder when a statement is required " "syntactically, but no code needs to be executed, for example::" msgstr "" +":keyword:`pass` ist eine Nulloperation – bei ihrer Ausführung passiert " +"nichts. Sie eignet sich als Platzhalter, wenn syntaktisch eine Anweisung " +"erforderlich ist, aber kein Code ausgeführt werden muss, zum Beispiel::" msgid "" "def f(arg): pass # a function that does nothing (yet)\n" @@ -419,77 +623,113 @@ msgid "" msgstr "" msgid "The :keyword:`!del` statement" -msgstr "" +msgstr "Die :keyword:`!del` Anweisung" msgid "" "Deletion is recursively defined very similar to the way assignment is " "defined. Rather than spelling it out in full details, here are some hints." msgstr "" +"Die Löschung wird rekursiv definiert, ganz ähnlich wie die Zuweisung. " +"Anstatt hier auf alle Einzelheiten einzugehen, hier einige Hinweise." msgid "" "Deletion of a target list recursively deletes each target, from left to " "right." msgstr "" +"Durch das Löschen einer Zielliste werden alle Ziele rekursiv von links nach " +"rechts gelöscht." msgid "" -"Deletion of a name removes the binding of that name from the local or global " -"namespace, depending on whether the name occurs in a :keyword:`global` " -"statement in the same code block. Trying to delete an unbound name raises " -"a :exc:`NameError` exception." +"Deletion of a name removes the binding of that name from the local or global" +" namespace, depending on whether the name occurs in a :keyword:`global` " +"statement in the same code block. Trying to delete an unbound name raises a" +" :exc:`NameError` exception." msgstr "" +"Durch das Löschen eines Namens wird die Bindung dieses Namens aus dem " +"lokalen oder globalen Namensraum entfernt, je nachdem, ob der Name in einer " +"` :keyword:`global` `-Anweisung im selben Codeblock vorkommt. Der Versuch, " +"einen ungebundenen Namen zu löschen, löst eine :exc:`NameError` `-Ausnahme" +" aus." msgid "" -"Deletion of attribute references, subscriptions and slicings is passed to " -"the primary object involved; deletion of a slicing is in general equivalent " -"to assignment of an empty slice of the right type (but even this is " -"determined by the sliced object)." +"Deletion of attribute references and subscriptions is passed to the primary " +"object involved; deletion of a slicing is in general equivalent to " +"assignment of an empty slice of the right type (but even this is determined " +"by the sliced object)." msgstr "" +"Das Löschen von Attributverweisen und Abonnements wird an das betroffene " +"Primärobjekt weitergeleitet; das Löschen eines Slices entspricht im " +"Allgemeinen der Zuweisung eines leeren Slices des richtigen Typs (doch " +"selbst dies wird durch das geslicete Objekt bestimmt)." msgid "" "Previously it was illegal to delete a name from the local namespace if it " "occurs as a free variable in a nested block." msgstr "" +"Bisher war es nicht zulässig, einen Namen aus dem lokalen Namensraum zu " +"löschen, wenn er als freie Variable in einem verschachtelten Block vorkommt." msgid "The :keyword:`!return` statement" -msgstr "" +msgstr "Die :keyword:`!return` Anweisung" msgid "" ":keyword:`return` may only occur syntactically nested in a function " "definition, not within a nested class definition." msgstr "" +":keyword:`return` darf nur syntaktisch in einer Funktionsdefinition " +"verschachtelt vorkommen, nicht jedoch innerhalb einer verschachtelten " +"Klassendefinition." msgid "" "If an expression list is present, it is evaluated, else ``None`` is " "substituted." msgstr "" +"Ist eine Ausdrucksliste vorhanden, wird diese ausgewertet; andernfalls wird " +" ``None`` eingesetzt." msgid "" ":keyword:`return` leaves the current function call with the expression list " "(or ``None``) as return value." msgstr "" +":keyword:`return` beendet den aktuellen Funktionsaufruf mit der " +"Ausdrucksliste (oder \"``None`` \". als Rückgabewert." msgid "" -"When :keyword:`return` passes control out of a :keyword:`try` statement with " -"a :keyword:`finally` clause, that :keyword:`!finally` clause is executed " +"When :keyword:`return` passes control out of a :keyword:`try` statement with" +" a :keyword:`finally` clause, that :keyword:`!finally` clause is executed " "before really leaving the function." msgstr "" +"Wenn :keyword:`return` die Kontrolle aus einer :keyword:`try` " +"-Anweisung mit einer :keyword:`finally` -Klausel abgibt, wird diese " +":keyword:`!finally` -Klausel ausgeführt, bevor die Funktion tatsächlich " +"verlassen wird." msgid "" "In a generator function, the :keyword:`return` statement indicates that the " "generator is done and will cause :exc:`StopIteration` to be raised. The " -"returned value (if any) is used as an argument to construct :exc:" -"`StopIteration` and becomes the :attr:`StopIteration.value` attribute." +"returned value (if any) is used as an argument to construct " +":exc:`StopIteration` and becomes the :attr:`StopIteration.value` attribute." msgstr "" +"In einer Generatorfunktion gibt die Anweisung :keyword:`return` an, " +"dass der Generator fertig ist, und löst die Ausnahme :exc:`StopIteration` " +"; aus. Der zurückgegebene Wert (falls vorhanden) wird als Argument für die " +"Erstellung von :exc:`StopIteration` verwendet und wird zum Attribut " +":attr:`StopIteration.value` ." msgid "" "In an asynchronous generator function, an empty :keyword:`return` statement " -"indicates that the asynchronous generator is done and will cause :exc:" -"`StopAsyncIteration` to be raised. A non-empty :keyword:`!return` statement " -"is a syntax error in an asynchronous generator function." +"indicates that the asynchronous generator is done and will cause " +":exc:`StopAsyncIteration` to be raised. A non-empty :keyword:`!return` " +"statement is a syntax error in an asynchronous generator function." msgstr "" +"In einer asynchronen Generatorfunktion zeigt eine leere :keyword:`return`" +" -Anweisung an, dass der asynchrone Generator beendet ist, und führt dazu, " +"dass eine :exc:`StopAsyncIteration` -Ausnahme ausgelöst wird. Eine nicht " +"leere :keyword:`!return` -Anweisung stellt in einer asynchronen " +"Generatorfunktion einen Syntaxfehler dar." msgid "The :keyword:`!yield` statement" -msgstr "" +msgstr "Die :keyword:`!yield` Anweisung" msgid "" "A :keyword:`yield` statement is semantically equivalent to a :ref:`yield " @@ -497,14 +737,21 @@ msgid "" "parentheses that would otherwise be required in the equivalent yield " "expression statement. For example, the yield statements ::" msgstr "" +"Eine Anweisung vom Typ :keyword:`yield` ist semantisch äquivalent zu " +"einem :ref:`Yield-Ausdruck `. Mit der Anweisung ``yield`` " +"lassen sich die Klammern weglassen, die andernfalls in der entsprechenden " +"Yield-Ausdruck-Anweisung erforderlich wären. Beispielsweise die Yield-" +"Anweisungen ::" msgid "" "yield \n" "yield from " msgstr "" +"Ertrag \n" +"Ertrag aus " msgid "are equivalent to the yield expression statements ::" -msgstr "" +msgstr "entsprechen den folgenden \"yield\"-Anweisungen ::" msgid "" "(yield )\n" @@ -512,51 +759,77 @@ msgid "" msgstr "" msgid "" -"Yield expressions and statements are only used when defining a :term:" -"`generator` function, and are only used in the body of the generator " +"Yield expressions and statements are only used when defining a " +":term:`generator` function, and are only used in the body of the generator " "function. Using :keyword:`yield` in a function definition is sufficient to " "cause that definition to create a generator function instead of a normal " "function." msgstr "" +"Yield-Ausdrücke und -Anweisungen werden ausschließlich bei der Definition " +"einer :term:`Generator`-Funktion verwendet und kommen nur im Körper der " +"Generatorfunktion zum Einsatz. Die Verwendung von :keyword:`yield` in " +"einer Funktionsdefinition reicht aus, um zu bewirken, dass diese Definition " +"eine Generatorfunktion anstelle einer normalen Funktion erzeugt." msgid "" -"For full details of :keyword:`yield` semantics, refer to the :ref:" -"`yieldexpr` section." +"For full details of :keyword:`yield` semantics, refer to the " +":ref:`yieldexpr` section." msgstr "" +"Ausführliche Informationen zur Semantik von :keyword:`yield` finden Sie" +" im Abschnitt :ref:`yieldexpr` ." msgid "The :keyword:`!raise` statement" -msgstr "" +msgstr "Die :keyword:`!raise` Anweisung" msgid "" -"If no expressions are present, :keyword:`raise` re-raises the exception that " -"is currently being handled, which is also known as the *active exception*. " +"If no expressions are present, :keyword:`raise` re-raises the exception that" +" is currently being handled, which is also known as the *active exception*. " "If there isn't currently an active exception, a :exc:`RuntimeError` " "exception is raised indicating that this is an error." msgstr "" +"Sind keine Ausdrücke vorhanden, löst :keyword:`raise` die Ausnahme " +"erneut aus, die derzeit abgefangen wird – diese wird auch als *aktive " +"Ausnahme* bezeichnet. Ist derzeit keine aktive Ausnahme vorhanden, wird die " +"Ausnahme :exc:`RuntimeError` ausgelöst, um anzuzeigen, dass es sich um " +"einen Fehler handelt." msgid "" "Otherwise, :keyword:`raise` evaluates the first expression as the exception " -"object. It must be either a subclass or an instance of :class:" -"`BaseException`. If it is a class, the exception instance will be obtained " -"when needed by instantiating the class with no arguments." +"object. It must be either a subclass or an instance of " +":class:`BaseException`. If it is a class, the exception instance will be " +"obtained when needed by instantiating the class with no arguments." msgstr "" +"Andernfalls wertet :keyword:`raise` den ersten Ausdruck als " +"Ausnahmeobjekt aus. Es muss sich dabei entweder um eine Unterklasse oder " +"eine Instanz von :class:`BaseException`` handeln. Handelt es sich um eine " +"Klasse, wird die Ausnahmeinstanz bei Bedarf durch Instanziierung der Klasse " +"ohne Argumente abgerufen." msgid "" -"The :dfn:`type` of the exception is the exception instance's class, the :dfn:" -"`value` is the instance itself." +"The :dfn:`type` of the exception is the exception instance's class, the " +":dfn:`value` is the instance itself." msgstr "" +"Der :dfn:`type` der Ausnahme ist die Klasse der Ausnahminstanz, der " +":dfn:`value` ist die Instanz selbst." msgid "" "A traceback object is normally created automatically when an exception is " "raised and attached to it as the :attr:`~BaseException.__traceback__` " "attribute. You can create an exception and set your own traceback in one " -"step using the :meth:`~BaseException.with_traceback` exception method (which " -"returns the same exception instance, with its traceback set to its " +"step using the :meth:`~BaseException.with_traceback` exception method (which" +" returns the same exception instance, with its traceback set to its " "argument), like so::" msgstr "" +"Ein Traceback-Objekt wird normalerweise automatisch erstellt, wenn eine " +"Ausnahme ausgelöst wird, und dieser als Attribut " +":attr:`~BaseException.__traceback__` zugeordnet. Sie können eine Ausnahme " +"erstellen und in einem Schritt Ihr eigenes Traceback festlegen, indem Sie " +"die Ausnahmemethode :meth:`~BaseException.with_traceback` verwenden " +"(die dieselbe Ausnahminstanz zurückgibt, wobei deren Traceback auf das " +"übergebene Argument gesetzt wird), und zwar wie folgt::" msgid "raise Exception(\"foo occurred\").with_traceback(tracebackobj)" -msgstr "" +msgstr "raise Exception(\"foo occurred\").with_traceback(tracebackobj)" msgid "" "The ``from`` clause is used for exception chaining: if given, the second " @@ -568,6 +841,15 @@ msgid "" "raised exception as the :attr:`!__cause__` attribute. If the raised " "exception is not handled, both exceptions will be printed:" msgstr "" +"Die Klausel ``from`` wird für die Ausnahmekettenbildung verwendet: Falls" +" angegeben, muss der zweite *Ausdruck* eine weitere Ausnahmeklasse oder " +"-instanz sein. Handelt es sich bei dem zweiten Ausdruck um eine " +"Ausnahmeninstanz, wird diese der ausgelösten Ausnahme als Attribut " +":attr:`~BaseException.__cause__` (das beschreibbar ist) hinzugefügt. Ist" +" der Ausdruck eine Ausnahmeklasse, wird die Klasse instanziiert und die " +"resultierende Ausnahmeinstanz der ausgelösten Ausnahme als Attribut " +":attr:`!__cause__` hinzugefügt. Wird die ausgelöste Ausnahme nicht " +"abgefangen, werden beide Ausnahmen ausgegeben:" msgid "" ">>> try:\n" @@ -588,14 +870,37 @@ msgid "" " raise RuntimeError(\"Something bad happened\") from exc\n" "RuntimeError: Something bad happened" msgstr "" +">>> try:\n" +"... print(1 / 0)\n" +"... except Exception as exc:\n" +"... raise RuntimeError(\"Something bad happened\") from exc\n" +"...\n" +"Traceback (most recent call last):\n" +" File \"\", line 2, in \n" +" print(1 / 0)\n" +" ~~^~~\n" +"ZeroDivisionError: division by zero\n" +"\n" +"The above exception was the direct cause of the following exception:\n" +"\n" +"Traceback (most recent call last):\n" +" File \"\", line 4, in \n" +" raise RuntimeError(\"Something bad happened\") from exc\n" +"RuntimeError: Something bad happened" msgid "" "A similar mechanism works implicitly if a new exception is raised when an " -"exception is already being handled. An exception may be handled when an :" -"keyword:`except` or :keyword:`finally` clause, or a :keyword:`with` " +"exception is already being handled. An exception may be handled when an " +":keyword:`except` or :keyword:`finally` clause, or a :keyword:`with` " "statement, is used. The previous exception is then attached as the new " "exception's :attr:`~BaseException.__context__` attribute:" msgstr "" +"Ein ähnlicher Mechanismus greift implizit, wenn eine neue Ausnahme ausgelöst" +" wird, während bereits eine Ausnahme abgefangen wird. Eine Ausnahme kann " +"abgefangen werden, wenn eine :keyword:`except` - oder " +":keyword:`finally` -Klausel oder eine :keyword:`with` -Anweisung " +"verwendet wird. Die vorherige Ausnahme wird dann als Attribut " +":attr:`~BaseException.__context__` der neuen Ausnahme angehängt:" msgid "" ">>> try:\n" @@ -616,11 +921,30 @@ msgid "" " raise RuntimeError(\"Something bad happened\")\n" "RuntimeError: Something bad happened" msgstr "" +">>> try:\n" +"... print(1 / 0)\n" +"... except:\n" +"... raise RuntimeError(\"Something bad happened\")\n" +"...\n" +"Traceback (most recent call last):\n" +" File \"\", line 2, in \n" +" print(1 / 0)\n" +" ~~^~~\n" +"ZeroDivisionError: division by zero\n" +"\n" +"During handling of the above exception, another exception occurred:\n" +"\n" +"Traceback (most recent call last):\n" +" File \"\", line 4, in \n" +" raise RuntimeError(\"Something bad happened\")\n" +"RuntimeError: Something bad happened" msgid "" "Exception chaining can be explicitly suppressed by specifying :const:`None` " "in the ``from`` clause:" msgstr "" +"Die Ausnahmekettenbildung kann explizit unterbunden werden, indem in der " +"``from`` -Klausel :const:`None` angegeben wird:" msgid "" ">>> try:\n" @@ -634,114 +958,169 @@ msgid "" msgstr "" msgid "" -"Additional information on exceptions can be found in section :ref:" -"`exceptions`, and information about handling exceptions is in section :ref:" -"`try`." +"Additional information on exceptions can be found in section " +":ref:`exceptions`, and information about handling exceptions is in section " +":ref:`try`." msgstr "" +"Weitere Informationen zu Ausnahmen finden Sie im Abschnitt " +":ref:`exceptions`, Informationen zur Behandlung von Ausnahmen im Abschnitt " +":ref:`try`." msgid ":const:`None` is now permitted as ``Y`` in ``raise X from Y``." -msgstr "" +msgstr ":const:`None` ist nun unter ``Y`` in ``raise X from Y`` zulässig." msgid "" "Added the :attr:`~BaseException.__suppress_context__` attribute to suppress " "automatic display of the exception context." msgstr "" +"Das Attribut :attr:`~BaseException.__suppress_context__` wurde " +"hinzugefügt, um die automatische Anzeige des Ausnahmekontexts zu " +"unterdrücken." msgid "" -"If the traceback of the active exception is modified in an :keyword:`except` " -"clause, a subsequent ``raise`` statement re-raises the exception with the " +"If the traceback of the active exception is modified in an :keyword:`except`" +" clause, a subsequent ``raise`` statement re-raises the exception with the " "modified traceback. Previously, the exception was re-raised with the " "traceback it had when it was caught." msgstr "" +"Wird der Traceback der aktiven Ausnahme in einer :keyword:`except` " +"-Klausel geändert, löst eine nachfolgende ``raise`` -Anweisung die " +"Ausnahme mit dem geänderten Traceback erneut aus. Bisher wurde die Ausnahme " +"mit dem Traceback ausgelöst, den sie zum Zeitpunkt ihrer Abfangung hatte." msgid "The :keyword:`!break` statement" -msgstr "" +msgstr "Die Erklärung der :keyword:`!break` Anweisung. msgid "" -":keyword:`break` may only occur syntactically nested in a :keyword:`for` or :" -"keyword:`while` loop, but not nested in a function or class definition " +":keyword:`break` may only occur syntactically nested in a :keyword:`for` or " +":keyword:`while` loop, but not nested in a function or class definition " "within that loop." msgstr "" +":keyword:`break` dürfen syntaktisch nur in einer :keyword:`for` - oder " +" :keyword:`while` -Schleife verschachtelt vorkommen, jedoch nicht in " +"einer Funktions- oder Klassendefinition innerhalb dieser Schleife." msgid "" -"It terminates the nearest enclosing loop, skipping the optional :keyword:`!" -"else` clause if the loop has one." +"It terminates the nearest enclosing loop, skipping the optional " +":keyword:`!else` clause if the loop has one." msgstr "" +"Sie beendet die nächstgelegene umschließende Schleife und überspringt dabei " +"die optionale Klausel :keyword:`!else`, falls die Schleife eine solche " +"enthält." msgid "" -"If a :keyword:`for` loop is terminated by :keyword:`break`, the loop control " -"target keeps its current value." +"If a :keyword:`for` loop is terminated by :keyword:`break`, the loop control" +" target keeps its current value." msgstr "" +"Wird eine :keyword:`for` -Schleife durch :keyword:`break` beendet, " +"behält das Schleifensteuerungsziel seinen aktuellen Wert bei." msgid "" "When :keyword:`break` passes control out of a :keyword:`try` statement with " "a :keyword:`finally` clause, that :keyword:`!finally` clause is executed " "before really leaving the loop." msgstr "" +"Wenn :keyword:`break` die Kontrolle aus einer :keyword:`try` " +"-Anweisung mit einer :keyword:`finally` -Klausel abgibt, wird diese " +":keyword:`!finally` -Klausel ausgeführt, bevor die Schleife tatsächlich " +"verlassen wird." msgid "The :keyword:`!continue` statement" -msgstr "" +msgstr "Die :keyword:`!continue` Anweisung" msgid "" ":keyword:`continue` may only occur syntactically nested in a :keyword:`for` " "or :keyword:`while` loop, but not nested in a function or class definition " -"within that loop. It continues with the next cycle of the nearest enclosing " -"loop." +"within that loop. It continues with the next cycle of the nearest enclosing" +" loop." msgstr "" +":keyword:`continue` darf syntaktisch nur in einer :keyword:`for` - oder " +" :keyword:`while` -Schleife verschachtelt vorkommen, jedoch nicht in " +"einer Funktions- oder Klassendefinition innerhalb dieser Schleife. Es wird " +"mit dem nächsten Zyklus der nächstübergeordneten Schleife fortgesetzt." msgid "" "When :keyword:`continue` passes control out of a :keyword:`try` statement " "with a :keyword:`finally` clause, that :keyword:`!finally` clause is " "executed before really starting the next loop cycle." msgstr "" +"Wenn :keyword:`continue` die Steuerung aus einer :keyword:`try` " +"-Anweisung mit einer :keyword:`finally` -Klausel abgibt, wird diese " +":keyword:`!finally` -Klausel ausgeführt, bevor der nächste " +"Schleifenzyklus tatsächlich beginnt." msgid "The :keyword:`!import` statement" -msgstr "" +msgstr "Die :keyword:`!import` Anweisung" msgid "" "The basic import statement (no :keyword:`from` clause) is executed in two " "steps:" msgstr "" +"Die einfache IMPORT-Anweisung (ohne :keyword:`from` -Klausel) wird in " +"zwei Schritten ausgeführt:" msgid "find a module, loading and initializing it if necessary" -msgstr "" +msgstr "ein Modul suchen und es gegebenenfalls laden und initialisieren" msgid "" -"define a name or names in the local namespace for the scope where the :" -"keyword:`import` statement occurs." +"define a name or names in the current namespace for the scope where the " +":keyword:`import` statement occurs, just as an assignment statement would " +"(including :keyword:`global` and :keyword:`nonlocal` semantics)." msgstr "" +"Definiert einen oder mehrere Namen im aktuellen Namensraum für den " +"Gültigkeitsbereich, in dem die Anweisung :keyword:`import` auftritt, " +"genau wie es eine Zuweisungsanweisung tun würde (einschließlich der Semantik" +" von :keyword:`global` und :keyword:`nonlocal` \".." msgid "" "When the statement contains multiple clauses (separated by commas) the two " -"steps are carried out separately for each clause, just as though the clauses " -"had been separated out into individual import statements." +"steps are carried out separately for each clause, just as though the clauses" +" had been separated out into individual import statements." msgstr "" +"Wenn die Anweisung mehrere Klauseln enthält (die durch Kommas getrennt " +"sind), werden die beiden Schritte für jede Klausel separat ausgeführt, so " +"als wären die Klauseln in einzelne `import`-Anweisungen aufgeteilt worden." msgid "" -"The details of the first step, finding and loading modules, are described in " -"greater detail in the section on the :ref:`import system `, " +"The details of the first step, finding and loading modules, are described in" +" greater detail in the section on the :ref:`import system `, " "which also describes the various types of packages and modules that can be " "imported, as well as all the hooks that can be used to customize the import " "system. Note that failures in this step may indicate either that the module " "could not be located, *or* that an error occurred while initializing the " "module, which includes execution of the module's code." msgstr "" +"Die Einzelheiten des ersten Schritts – das Auffinden und Laden von Modulen –" +" werden im Abschnitt über das :ref:`Import-System ` " +"ausführlicher beschrieben. Dort werden auch die verschiedenen Arten von " +"Paketen und Modulen erläutert, die importiert werden können, sowie alle " +"Hooks, mit denen sich das Import-System anpassen lässt. Beachten Sie, dass " +"Fehler in diesem Schritt entweder darauf hindeuten können, dass das Modul " +"nicht gefunden werden konnte, *oder* dass bei der Initialisierung des Moduls" +" ein Fehler aufgetreten ist, wozu auch die Ausführung des Modulcodes gehört." msgid "" -"If the requested module is retrieved successfully, it will be made available " -"in the local namespace in one of three ways:" +"If the requested module is retrieved successfully, it will be made available" +" in the local namespace in one of three ways:" msgstr "" +"Wird das angeforderte Modul erfolgreich abgerufen, wird es auf eine von drei" +" Arten im lokalen Namensraum bereitgestellt:" msgid "" -"If the module name is followed by :keyword:`!as`, then the name following :" -"keyword:`!as` is bound directly to the imported module." +"If the module name is followed by :keyword:`!as`, then the name following " +":keyword:`!as` is bound directly to the imported module." msgstr "" +"Folgt auf den Modulnamen :keyword:`!as`, wird der Name nach " +":keyword:`!as` direkt an das importierte Modul gebunden." msgid "" "If no other name is specified, and the module being imported is a top level " "module, the module's name is bound in the local namespace as a reference to " "the imported module" msgstr "" +"Wenn kein anderer Name angegeben wird und es sich bei dem importierten Modul" +" um ein Modul der obersten Ebene handelt, wird der Name des Moduls im " +"lokalen Namensraum als Verweis auf das importierte Modul gebunden." msgid "" "If the module being imported is *not* a top level module, then the name of " @@ -749,108 +1128,171 @@ msgid "" "namespace as a reference to the top level package. The imported module must " "be accessed using its full qualified name rather than directly" msgstr "" +"Wenn es sich bei dem importierten Modul *nicht* um ein Modul der obersten " +"Ebene handelt, wird der Name des Pakets der obersten Ebene, das das Modul " +"enthält, im lokalen Namensraum als Verweis auf dieses Paket der obersten " +"Ebene gebunden. Der Zugriff auf das importierte Modul muss über dessen " +"vollqualifizierten Namen erfolgen und nicht direkt." msgid "The :keyword:`from` form uses a slightly more complex process:" msgstr "" +"Das Formular :keyword:`from` (Antrag auf eine vorläufige " +"Aufenthaltsgenehmigung) sieht einen etwas komplexeren Ablauf vor:" msgid "" "find the module specified in the :keyword:`from` clause, loading and " "initializing it if necessary;" msgstr "" +"das in der Klausel :keyword:`from` angegebene Modul suchen und es " +"gegebenenfalls laden und initialisieren;" -msgid "for each of the identifiers specified in the :keyword:`import` clauses:" +msgid "" +"for each of the identifiers specified in the :keyword:`import` clauses:" msgstr "" +"für jeden der in den :keyword:`import` -Klauseln angegebenen Bezeichner:" msgid "check if the imported module has an attribute by that name" -msgstr "" +msgstr "Prüfe, ob das importierte Modul ein Attribut mit diesem Namen hat" msgid "" "if not, attempt to import a submodule with that name and then check the " "imported module again for that attribute" msgstr "" +"Falls nicht, versuchen Sie, ein Submodul mit diesem Namen zu importieren, " +"und überprüfen Sie anschließend das importierte Modul erneut auf dieses " +"Attribut." msgid "if the attribute is not found, :exc:`ImportError` is raised." msgstr "" +"Wird das Attribut nicht gefunden, wird eine :exc:`ImportError` " +"ausgelöst." msgid "" -"otherwise, a reference to that value is stored in the local namespace, using " -"the name in the :keyword:`!as` clause if it is present, otherwise using the " -"attribute name" +"otherwise, a reference to that value is stored in the current namespace, " +"using the name in the :keyword:`!as` clause if it is present, otherwise " +"using the attribute name" msgstr "" +"Andernfalls wird ein Verweis auf diesen Wert im aktuellen Namensraum " +"gespeichert, wobei der Name in der Klausel :keyword:`!as` verwendet " +"wird, sofern vorhanden; andernfalls wird der Attributname verwendet." msgid "Examples::" -msgstr "" +msgstr "Beispiele::" msgid "" "import foo # foo imported and bound locally\n" -"import foo.bar.baz # foo, foo.bar, and foo.bar.baz imported, foo " -"bound locally\n" -"import foo.bar.baz as fbb # foo, foo.bar, and foo.bar.baz imported, foo.bar." -"baz bound as fbb\n" -"from foo.bar import baz # foo, foo.bar, and foo.bar.baz imported, foo.bar." -"baz bound as baz\n" +"import foo.bar.baz # foo, foo.bar, and foo.bar.baz imported, foo bound locally\n" +"import foo.bar.baz as fbb # foo, foo.bar, and foo.bar.baz imported, foo.bar.baz bound as fbb\n" +"from foo.bar import baz # foo, foo.bar, and foo.bar.baz imported, foo.bar.baz bound as baz\n" "from foo import attr # foo imported and foo.attr bound as attr" msgstr "" msgid "" -"If the list of identifiers is replaced by a star (``'*'``), all public names " -"defined in the module are bound in the local namespace for the scope where " +"If the list of identifiers is replaced by a star (``'*'``), all public names" +" defined in the module are bound in the local namespace for the scope where " "the :keyword:`import` statement occurs." msgstr "" +"Wird die Liste der Bezeichner durch ein Sternchen (``'*'``) ersetzt, werden " +"alle im Modul definierten öffentlichen Namen im lokalen Namensraum für den " +"Geltungsbereich gebunden, in dem die Anweisung :keyword:`import` " +"auftritt." msgid "" "The *public names* defined by a module are determined by checking the " "module's namespace for a variable named ``__all__``; if defined, it must be " -"a sequence of strings which are names defined or imported by that module. " -"The names given in ``__all__`` are all considered public and are required to " -"exist. If ``__all__`` is not defined, the set of public names includes all " -"names found in the module's namespace which do not begin with an underscore " -"character (``'_'``). ``__all__`` should contain the entire public API. It " -"is intended to avoid accidentally exporting items that are not part of the " -"API (such as library modules which were imported and used within the module)." -msgstr "" +"a sequence of strings which are names defined or imported by that module. " +"Names containing non-ASCII characters must be in the `normalization form`_ " +"NFKC; see :ref:`lexical-names-nonascii` for details. The names given in " +"``__all__`` are all considered public and are required to exist. If " +"``__all__`` is not defined, the set of public names includes all names found" +" in the module's namespace which do not begin with an underscore character " +"(``'_'``). ``__all__`` should contain the entire public API. It is intended" +" to avoid accidentally exporting items that are not part of the API (such as" +" library modules which were imported and used within the module)." +msgstr "" +"Die von einem Modul definierten *öffentlichen Namen* werden ermittelt, indem" +" der Namensraum des Moduls auf eine Variable namens ``__all__`` " +"überprüft wird; ist diese definiert, muss es sich um eine Folge von " +"Zeichenketten handeln, bei denen es sich um Namen handelt, die von diesem " +"Modul definiert oder importiert wurden. Namen, die Nicht-ASCII-Zeichen " +"enthalten, müssen in der `Normalisierungsform`_ NFKC vorliegen; Einzelheiten" +" finden Sie unter :ref:`lexical-names-nonascii`. Die in ``__all__`` " +"aufgeführten Namen gelten alle als öffentlich und müssen vorhanden sein. " +"Ist ``__all__`` nicht definiert, umfasst die Menge der öffentlichen " +"Namen alle Namen im Namensraum des Moduls, die nicht mit einem Unterstrich " +"(``'_'``) beginnen. ``__all__`` sollte die gesamte öffentliche API " +"enthalten. Damit soll vermieden werden, dass versehentlich Elemente " +"exportiert werden, die nicht Teil der API sind (wie z. B. Bibliotheksmodule," +" die innerhalb des Moduls importiert und verwendet wurden)." msgid "" "The wild card form of import --- ``from module import *`` --- is only " "allowed at the module level. Attempting to use it in class or function " "definitions will raise a :exc:`SyntaxError`." msgstr "" +"Die Wildcard-Form des Imports --- ``from module import *`` --- ist nur auf " +"Modulebene zulässig. Der Versuch, sie in Klassen- oder Funktionsdefinitionen" +" zu verwenden, löst einen :exc:`SyntaxError` aus." msgid "" "When specifying what module to import you do not have to specify the " "absolute name of the module. When a module or package is contained within " -"another package it is possible to make a relative import within the same top " -"package without having to mention the package name. By using leading dots in " -"the specified module or package after :keyword:`from` you can specify how " -"high to traverse up the current package hierarchy without specifying exact " -"names. One leading dot means the current package where the module making the " -"import exists. Two dots means up one package level. Three dots is up two " +"another package it is possible to make a relative import within the same top" +" package without having to mention the package name. By using leading dots " +"in the specified module or package after :keyword:`from` you can specify how" +" high to traverse up the current package hierarchy without specifying exact " +"names. One leading dot means the current package where the module making the" +" import exists. Two dots means up one package level. Three dots is up two " "levels, etc. So if you execute ``from . import mod`` from a module in the " "``pkg`` package then you will end up importing ``pkg.mod``. If you execute " "``from ..subpkg2 import mod`` from within ``pkg.subpkg1`` you will import " "``pkg.subpkg2.mod``. The specification for relative imports is contained in " "the :ref:`relativeimports` section." msgstr "" +"Bei der Angabe des zu importierenden Moduls müssen Sie nicht den absoluten " +"Namen des Moduls angeben. Befindet sich ein Modul oder Paket in einem " +"anderen Paket, ist es möglich, innerhalb desselben obersten Pakets einen " +"relativen Import durchzuführen, ohne den Paketnamen anzugeben. Durch die " +"Verwendung von führenden Punkten im angegebenen Modul oder Paket nach " +":keyword:`from` können Sie festlegen, wie weit Sie in der aktuellen " +"Pakethierarchie nach oben navigieren möchten, ohne genaue Namen angeben zu " +"müssen. Ein führender Punkt bedeutet das aktuelle Paket, in dem sich das " +"Modul befindet, das den Import durchführt. Zwei Punkte bedeuten eine " +"Paketebene höher. Drei Punkte bedeuten zwei Ebenen nach oben usw. Wenn Sie " +"also ``from . import mod`` aus einem Modul im Paket ``pkg`` " +"ausführen, importieren Sie letztendlich ``pkg.mod``. Wenn Sie ``from " +"..subpkg2 import mod`` aus dem Paket ``pkg.subpkg1`` ausführen, " +"importieren Sie ``pkg.subpkg2.mod``. Die Spezifikation für relative " +"Importe ist im Abschnitt :ref:`relativeimports` enthalten." msgid "" ":func:`importlib.import_module` is provided to support applications that " "determine dynamically the modules to be loaded." msgstr "" +":func:`importlib.import_module` wird bereitgestellt, um Anwendungen zu " +"unterstützen, die die zu ladenden Module dynamisch ermitteln." msgid "" "Raises an :ref:`auditing event ` ``import`` with arguments " -"``module``, ``filename``, ``sys.path``, ``sys.meta_path``, ``sys." -"path_hooks``." +"``module``, ``filename``, ``sys.path``, ``sys.meta_path``, " +"``sys.path_hooks``." msgstr "" +"Löst ein :ref:`Audit-Ereignis ` ``import`` mit den Argumenten " +"``module``, ``filename``, ``sys.path``, ``sys.meta_path``, " +"``sys.path_hooks`` aus." msgid "Future statements" -msgstr "" +msgstr "Future-Anweisung" msgid "" "A :dfn:`future statement` is a directive to the compiler that a particular " "module should be compiled using syntax or semantics that will be available " "in a specified future release of Python where the feature becomes standard." msgstr "" +"Eine :dfn:`Future-Anweisung` ist eine Anweisung an den Compiler, dass ein " +"bestimmtes Modul unter Verwendung einer Syntax oder Semantik kompiliert " +"werden soll, die in einer bestimmten zukünftigen Python-Version verfügbar " +"sein wird, in der diese Funktion zum Standard wird." msgid "" "The future statement is intended to ease migration to future versions of " @@ -858,37 +1300,52 @@ msgid "" "of the new features on a per-module basis before the release in which the " "feature becomes standard." msgstr "" +"Die Zukunftserklärung soll die Migration auf zukünftige Python-Versionen " +"erleichtern, die inkompatible Änderungen an der Sprache mit sich bringen. " +"Sie ermöglicht die Nutzung der neuen Funktionen auf Modulbasis bereits vor " +"der Veröffentlichung, in der die Funktion zum Standard wird." msgid "" "A future statement must appear near the top of the module. The only lines " "that can appear before a future statement are:" msgstr "" +"Eine \"future\"-Anweisung muss im oberen Bereich des Moduls stehen. Die " +"einzigen Zeilen, die vor einer \"future\"-Anweisung stehen dürfen, sind:" msgid "the module docstring (if any)," -msgstr "" +msgstr "die Docstring des Moduls (falls vorhanden)," msgid "comments," -msgstr "" +msgstr "Kommentare," msgid "blank lines, and" -msgstr "" +msgstr "Leerzeilen und" msgid "other future statements." -msgstr "" +msgstr "sonstige Future-Anweisung" msgid "" -"The only feature that requires using the future statement is ``annotations`` " -"(see :pep:`563`)." +"The only feature that requires using the future statement is ``annotations``" +" (see :pep:`563`)." msgstr "" +"Die einzige Funktion, für die die Verwendung der \"future\"-Anweisung " +"erforderlich ist, ist ``annotations`` (siehe :pep:`563`)." msgid "" -"All historical features enabled by the future statement are still recognized " -"by Python 3. The list includes ``absolute_import``, ``division``, " +"All historical features enabled by the future statement are still recognized" +" by Python 3. The list includes ``absolute_import``, ``division``, " "``generators``, ``generator_stop``, ``unicode_literals``, " "``print_function``, ``nested_scopes`` and ``with_statement``. They are all " "redundant because they are always enabled, and only kept for backwards " "compatibility." msgstr "" +"Alle historischen Funktionen, die durch die \"future\"-Anweisung aktiviert " +"werden, werden von Python 3 weiterhin erkannt. Dazu gehören " +"\"``absolute_import``, ``division``, ``generators``, " +"``generator_stop``, ``unicode_literals``, ``print_function``, " +" ``nested_scopes`` und ``with_statement`` . Sie sind alle überflüssig," +" da sie immer aktiviert sind, und werden nur aus Gründen der " +"Abwärtskompatibilität beibehalten." msgid "" "A future statement is recognized and treated specially at compile time: " @@ -898,26 +1355,42 @@ msgid "" "case the compiler may need to parse the module differently. Such decisions " "cannot be pushed off until runtime." msgstr "" +"Eine Zukunftsanweisung wird bereits zur Kompilierungszeit erkannt und " +"besonders behandelt: Änderungen an der Semantik von Kernkonstrukten werden " +"oft durch die Generierung von anderem Code umgesetzt. Es kann sogar " +"vorkommen, dass eine neue Funktion eine neue, inkompatible Syntax einführt " +"(wie beispielsweise ein neues Schlüsselwort); in diesem Fall muss der " +"Compiler das Modul möglicherweise anders analysieren. Solche Entscheidungen" +" können nicht bis zur Laufzeit aufgeschoben werden." msgid "" "For any given release, the compiler knows which feature names have been " "defined, and raises a compile-time error if a future statement contains a " "feature not known to it." msgstr "" +"Für jede beliebige Version weiß der Compiler, welche Funktionsnamen " +"definiert wurden, und löst einen Fehler zur Kompilierungszeit aus, wenn eine" +" \"future\"-Anweisung eine ihm unbekannte Funktion enthält." msgid "" -"The direct runtime semantics are the same as for any import statement: there " -"is a standard module :mod:`__future__`, described later, and it will be " +"The direct runtime semantics are the same as for any import statement: there" +" is a standard module :mod:`__future__`, described later, and it will be " "imported in the usual way at the time the future statement is executed." msgstr "" +"Die direkte Laufzeitsemantik entspricht der jeder anderen Importanweisung: " +"Es gibt ein Standardmodul :mod:`__future__`, das später beschrieben " +"wird und zum Zeitpunkt der Ausführung der \"future\"-Anweisung auf die übliche" +" Weise importiert wird." msgid "" "The interesting runtime semantics depend on the specific feature enabled by " "the future statement." msgstr "" +"Die interessante Laufzeitsemantik hängt von der jeweiligen Funktion ab, die " +"durch die \"future\"-Anweisung aktiviert wird." msgid "Note that there is nothing special about the statement::" -msgstr "" +msgstr "Beachten Sie, dass an dieser Aussage nichts Besonderes ist::" msgid "import __future__ [as name]" msgstr "" @@ -926,14 +1399,22 @@ msgid "" "That is not a future statement; it's an ordinary import statement with no " "special semantics or syntax restrictions." msgstr "" +"Das ist keine Zukunftsanweisung, sondern eine gewöhnliche Importanweisung " +"ohne besondere Semantik oder syntaktische Einschränkungen." msgid "" -"Code compiled by calls to the built-in functions :func:`exec` and :func:" -"`compile` that occur in a module :mod:`!M` containing a future statement " -"will, by default, use the new syntax or semantics associated with the future " -"statement. This can be controlled by optional arguments to :func:`compile` " -"--- see the documentation of that function for details." +"Code compiled by calls to the built-in functions :func:`exec` and " +":func:`compile` that occur in a module :mod:`!M` containing a future " +"statement will, by default, use the new syntax or semantics associated with " +"the future statement. This can be controlled by optional arguments to " +":func:`compile` --- see the documentation of that function for details." msgstr "" +"Code, der durch Aufrufe der integrierten Funktionen :func:`exec` und " +":func:`compile` kompiliert wird, die in einem Modul :mod:`!M` " +"vorkommen, das eine \"future\"-Anweisung enthält, verwendet standardmäßig die " +"neue Syntax bzw. Semantik, die mit der \"future\"-Anweisung verbunden ist. " +"Dies kann durch optionale Argumente an :func:`compile` gesteuert werden " +"– Einzelheiten finden Sie in der Dokumentation dieser Funktion." msgid "" "A future statement typed at an interactive interpreter prompt will take " @@ -942,15 +1423,21 @@ msgid "" "and the script includes a future statement, it will be in effect in the " "interactive session started after the script is executed." msgstr "" +"Eine \"future\"-Anweisung, die an der Eingabeaufforderung eines interaktiven " +"Interpreters eingegeben wird, gilt für den Rest der Interpreter-Sitzung. " +"Wird ein Interpreter mit der Option :option:`-i` gestartet, ihm ein " +"auszuführender Skriptname übergeben und enthält das Skript eine " + \"future\"-Anweisung, so gilt diese in der interaktiven Sitzung, die nach der " +"Ausführung des Skripts gestartet wird." msgid ":pep:`236` - Back to the __future__" -msgstr "" +msgstr ":pep:`236` - Zurück in die __Zukunft__" msgid "The original proposal for the __future__ mechanism." -msgstr "" +msgstr "Der ursprüngliche Vorschlag für den __future__-Mechanismus." msgid "The :keyword:`!global` statement" -msgstr "" +msgstr "Die Erklärung der :keyword:`!global` . msgid "" "The :keyword:`global` statement causes the listed identifiers to be " @@ -958,6 +1445,11 @@ msgid "" "variable without :keyword:`!global`, although free variables may refer to " "globals without being declared global." msgstr "" +"Die Anweisung :keyword:`global` bewirkt, dass die aufgeführten " +"Bezeichner als globale Variablen interpretiert werden. Ohne " +":keyword:`!global` wäre es unmöglich, einer globalen Variablen einen Wert " +"zuzuweisen, obwohl freie Variablen auf globale Variablen verweisen können, " +"ohne selbst als global deklariert zu sein." msgid "" "The :keyword:`!global` statement applies to the entire current scope " @@ -965,6 +1457,11 @@ msgid "" "if a variable is used or assigned to prior to its global declaration in the " "scope." msgstr "" +"Die Anweisung :keyword:`!global` gilt für den gesamten aktuellen " +"Geltungsbereich (Modul, Funktionskörper oder Klassendefinition). Es wird " +"eine :exc:`SyntaxError` ausgelöst, wenn eine Variable vor ihrer globalen" +" Deklaration in diesem Geltungsbereich verwendet oder ihr ein Wert " +"zugewiesen wird." msgid "" "At the module level, all variables are global, so a :keyword:`!global` " @@ -972,66 +1469,101 @@ msgid "" "assigned to prior to their :keyword:`!global` declaration. This requirement " "is relaxed in the interactive prompt (:term:`REPL`)." msgstr "" +"Auf Modulebene sind alle Variablen global, sodass eine :keyword:`!global` " +"`-Anweisung keine Wirkung hat. Variablen dürfen jedoch dennoch nicht " +"verwendet oder zugewiesen werden, bevor sie mit :keyword:`!global` " +"deklariert wurden. Diese Vorschrift wird in der interaktiven " +"Eingabeaufforderung (:term:`REPL`) gelockert." msgid "" "**Programmer's note:** :keyword:`global` is a directive to the parser. It " "applies only to code parsed at the same time as the :keyword:`!global` " "statement. In particular, a :keyword:`!global` statement contained in a " "string or code object supplied to the built-in :func:`exec` function does " -"not affect the code block *containing* the function call, and code contained " -"in such a string is unaffected by :keyword:`!global` statements in the code " -"containing the function call. The same applies to the :func:`eval` and :" -"func:`compile` functions." -msgstr "" +"not affect the code block *containing* the function call, and code contained" +" in such a string is unaffected by :keyword:`!global` statements in the code" +" containing the function call. The same applies to the :func:`eval` and " +":func:`compile` functions." +msgstr "" +"**Anmerkung des Programmierers:** :keyword:`global` ist eine Anweisung " +"an den Parser. Sie gilt nur für Code, der gleichzeitig mit der Anweisung " +":keyword:`!global` geparst wird. Insbesondere hat eine " +":keyword:`!global` -Anweisung, die in einer Zeichenkette oder einem " +"Codeobjekt enthalten ist, das der integrierten Funktion :func:`exec` " +"übergeben wird, keine Auswirkungen auf den Codeblock, der den " +"Funktionsaufruf *enthält*, und der in einer solchen Zeichenkette enthaltene " +"Code bleibt von :keyword:`!global` -Anweisungen in dem Code, der den " +"Funktionsaufruf enthält, unberührt. Dasselbe gilt für die Funktionen " +":func:`eval` und :func:`compile` ." msgid "The :keyword:`!nonlocal` statement" -msgstr "" +msgstr "Die :keyword:`!nonlocal` Anweisung" msgid "" "When the definition of a function or class is nested (enclosed) within the " "definitions of other functions, its nonlocal scopes are the local scopes of " -"the enclosing functions. The :keyword:`nonlocal` statement causes the listed " -"identifiers to refer to names previously bound in nonlocal scopes. It allows " -"encapsulated code to rebind such nonlocal identifiers. If a name is bound " -"in more than one nonlocal scope, the nearest binding is used. If a name is " -"not bound in any nonlocal scope, or if there is no nonlocal scope, a :exc:" -"`SyntaxError` is raised." -msgstr "" +"the enclosing functions. The :keyword:`nonlocal` statement causes the listed" +" identifiers to refer to names previously bound in nonlocal scopes. It " +"allows encapsulated code to rebind such nonlocal identifiers. If a name is " +"bound in more than one nonlocal scope, the nearest binding is used. If a " +"name is not bound in any nonlocal scope, or if there is no nonlocal scope, a" +" :exc:`SyntaxError` is raised." +msgstr "" +"Wenn die Definition einer Funktion oder Klasse in die Definitionen anderer " +"Funktionen eingebettet (umschlossen) ist, entsprechen ihre nichtlokalen " +"Gültigkeitsbereiche den lokalen Gültigkeitsbereichen der umschließenden " +"Funktionen. Die Anweisung :keyword:`nonlocal` bewirkt, dass die " +"aufgeführten Bezeichner auf Namen verweisen, die zuvor in nichtlokalen " +"Gültigkeitsbereichen gebunden wurden. Sie ermöglicht es, solche nichtlokalen" +" Bezeichner in gekapseltem Code neu zu binden. Ist ein Name in mehr als " +"einem nichtlokalen Gültigkeitsbereich gebunden, wird die nächstgelegene " +"Bindung verwendet. Ist ein Name in keinem nichtlokalen Gültigkeitsbereich " +"gebunden oder gibt es keinen nichtlokalen Gültigkeitsbereich, wird eine " +":exc:`SyntaxError` ausgelöst." msgid "" "The :keyword:`nonlocal` statement applies to the entire scope of a function " "or class body. A :exc:`SyntaxError` is raised if a variable is used or " "assigned to prior to its nonlocal declaration in the scope." msgstr "" +"Die Anweisung :keyword:`nonlocal` gilt für den gesamten Geltungsbereich" +" einer Funktion oder eines Klassenkörpers. Es wird eine Ausnahme vom Typ " +":exc:`SyntaxError` ausgelöst, wenn eine Variable verwendet oder zugewiesen" +" wird, bevor sie im Geltungsbereich nichtlokal deklariert wurde." msgid ":pep:`3104` - Access to Names in Outer Scopes" -msgstr "" +msgstr ":pep:`3104` - Zugriff auf Namen in äußeren Gültigkeitsbereichen" msgid "The specification for the :keyword:`nonlocal` statement." -msgstr "" +msgstr "Die Spezifikation für die Anweisung :keyword:`nonlocal` ." msgid "" "**Programmer's note:** :keyword:`nonlocal` is a directive to the parser and " -"applies only to code parsed along with it. See the note for the :keyword:" -"`global` statement." +"applies only to code parsed along with it. See the note for the " +":keyword:`global` statement." msgstr "" +"**Anmerkung des Programmierers:** :keyword:`nonlocal` ist eine Anweisung" +" an den Parser und gilt nur für Code, der zusammen mit dieser Anweisung " +"geparst wird. Siehe dazu die Anmerkung zur Anweisung :keyword:`global` ." msgid "The :keyword:`!type` statement" -msgstr "" +msgstr "Die :keyword:`!type` Anweisung" msgid "" "The :keyword:`!type` statement declares a type alias, which is an instance " "of :class:`typing.TypeAliasType`." msgstr "" +"Die Anweisung :keyword:`!type` deklariert einen Typalias, bei dem es " +"sich um eine Instanz von :class:`typing.TypeAliasType` handelt." msgid "For example, the following statement creates a type alias::" -msgstr "" +msgstr "Die folgende Anweisung erstellt beispielsweise einen Typalias::" msgid "type Point = tuple[float, float]" msgstr "" msgid "This code is roughly equivalent to::" -msgstr "" +msgstr "Dieser Code entspricht in etwa folgendem:" msgid "" "annotation-def VALUE_OF_Point():\n" @@ -1040,33 +1572,46 @@ msgid "" msgstr "" msgid "" -"``annotation-def`` indicates an :ref:`annotation scope `, " -"which behaves mostly like a function, but with several small differences." +"``annotation-def`` indicates an :ref:`annotation scope `," +" which behaves mostly like a function, but with several small differences." msgstr "" +"``annotation-def`` bezeichnet einen :ref:`Annotationsbereich `, der sich größtenteils wie eine Funktion verhält, jedoch einige " +"kleine Unterschiede aufweist." msgid "" "The value of the type alias is evaluated in the annotation scope. It is not " "evaluated when the type alias is created, but only when the value is " -"accessed through the type alias's :attr:`!__value__` attribute (see :ref:" -"`lazy-evaluation`). This allows the type alias to refer to names that are " -"not yet defined." +"accessed through the type alias's :attr:`!__value__` attribute (see " +":ref:`lazy-evaluation`). This allows the type alias to refer to names that " +"are not yet defined." msgstr "" +"Der Wert des Typalias wird im Geltungsbereich der Annotation ausgewertet. Er" +" wird nicht bei der Erstellung des Typalias ausgewertet, sondern erst dann, " +"wenn über das Attribut :attr:`!__value__` des Typalias auf den Wert " +"zugegriffen wird (siehe :ref:`lazy-evaluation`). Dadurch kann der Typalias " +"auf Namen verweisen, die noch nicht definiert sind." msgid "" -"Type aliases may be made generic by adding a :ref:`type parameter list ` after the name. See :ref:`generic-type-aliases` for more." +"Type aliases may be made generic by adding a :ref:`type parameter list " +"` after the name. See :ref:`generic-type-aliases` for more." msgstr "" +"Typaliase können generisch gemacht werden, indem man hinter dem Namen eine " +":ref:`Typ-Parameterliste ` hinzufügt. Weitere Informationen " +"finden Sie unter :ref:`generic-type-aliases`." msgid ":keyword:`!type` is a :ref:`soft keyword `." -msgstr "" +msgstr ":keyword:`!type` ist ein :ref:`Soft-Schlüsselwort `." msgid ":pep:`695` - Type Parameter Syntax" msgstr "" msgid "" -"Introduced the :keyword:`!type` statement and syntax for generic classes and " -"functions." +"Introduced the :keyword:`!type` statement and syntax for generic classes and" +" functions." msgstr "" +"Es wurden die Anweisung :keyword:`!type` sowie die Syntax für generische" +" Klassen und Funktionen eingeführt." msgid "simple" msgstr "" @@ -1138,7 +1683,7 @@ msgid "mutable" msgstr "" msgid "attribute" -msgstr "Attribut" +msgstr "" msgid "target" msgstr "" @@ -1402,4 +1947,4 @@ msgid "nonlocal" msgstr "" msgid "type" -msgstr "Typ" +msgstr "" From 89e49e4f2350570f10e4e27b5d595867802340f1 Mon Sep 17 00:00:00 2001 From: JystBreisgau Date: Sat, 22 Aug 2026 12:16:21 +0200 Subject: [PATCH 7/8] Fix formatting issues in /reference/compound_stmts.po --- reference/compound_stmts.po | 217 +++++++++++++++++++++++++++++++----- 1 file changed, 192 insertions(+), 25 deletions(-) diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index 67bd7914..638e4224 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -347,7 +347,7 @@ msgstr "" "`-Klausel eine Ausnahme ausgelöst wird, wird die ursprüngliche Suche nach " "einem Handler abgebrochen und es wird im umgebenden Code sowie auf dem " "Aufrufstapel nach einem Handler für die neue Ausnahme gesucht (es wird so " -"behandelt, als hätte die gesamte :keyword:`try` `-Anweisung die Ausnahme " +"behandelt, als hätte die gesamte :keyword:`try` -Anweisung die Ausnahme " "ausgelöst)." msgid "" @@ -377,13 +377,15 @@ msgid "" "the end of the :keyword:`!except` clause. This is as if::" msgstr "" "Wenn eine Ausnahme mit ``as target`` zugewiesen wurde, wird sie am Ende " -"der :keyword:`!except` `-Klausel zurückgesetzt. Dies entspricht folgendem " +"der :keyword:`!except` -Klausel zurückgesetzt. Dies entspricht folgendem " "Code::" msgid "" "except E as N:\n" " foo" msgstr "" +"except E as N:\n" +" foo" msgid "was translated to::" msgstr "wurde übersetzt in:" @@ -395,6 +397,11 @@ msgid "" " finally:\n" " del N" msgstr "" +"except E as N:\n" +" try:\n" +" foo\n" +" finally:\n" +" del N" msgid "" "This means the exception must be assigned to a different name to be able to " @@ -404,7 +411,7 @@ msgid "" "garbage collection occurs." msgstr "" "Das bedeutet, dass der Ausnahme ein anderer Name zugewiesen werden muss, " -"damit nach der :keyword:`!except` `-Klausel auf sie verwiesen werden kann." +"damit nach der :keyword:`!except` -Klausel auf sie verwiesen werden kann." " Ausnahmen werden gelöscht, da sie mit dem ihnen beigefügten Traceback einen" " Referenzzyklus mit dem Stack-Frame bilden, wodurch alle lokalen Variablen " "in diesem Frame so lange erhalten bleiben, bis die nächste Garbage " @@ -443,6 +450,23 @@ msgid "" ">>> print(sys.exception())\n" "None" msgstr "" +">>> print(sys.exception())\n" +"None\n" +">>> try:\n" +"... raise TypeError\n" +"... except:\n" +"... print(repr(sys.exception()))\n" +"... try:\n" +"... raise ValueError\n" +"... except:\n" +"... print(repr(sys.exception()))\n" +"... print(repr(sys.exception()))\n" +"...\n" +"TypeError()\n" +"ValueError()\n" +"TypeError()\n" +">>> print(sys.exception())\n" +"None" msgid ":keyword:`!except*` clause" msgstr ":keyword:`!except*` Klausel" @@ -459,7 +483,7 @@ msgid "" ":exc:`!BaseExceptionGroup`, because that would have ambiguous semantics." msgstr "" "Die Klausel(n) :keyword:`!except*` legen einen oder mehrere Handler für " -"Gruppen von Ausnahmen (Instanzen von `:exc:`BaseExceptionGroup` `) fest. " +"Gruppen von Ausnahmen (Instanzen von `:exc:`BaseExceptionGroup`) fest. " "Eine Anweisung :keyword:`try` kann entweder Klauseln vom Typ " ":keyword:`except` oder :keyword:`!except*` enthalten, jedoch nicht " "beide. Der Ausnahmetyp für den Abgleich ist im Fall von " @@ -528,6 +552,24 @@ msgid "" " | ValueError: 1\n" " +------------------------------------" msgstr "" +">>> try:\n" +"... raise ExceptionGroup(\"eg\",\n" +"... [ValueError(1), TypeError(2), OSError(3), OSError(4)])\n" +"... except* TypeError as e:\n" +"... print(f'caught {type(e)} with nested {e.exceptions}')\n" +"... except* OSError as e:\n" +"... print(f'caught {type(e)} with nested {e.exceptions}')\n" +"...\n" +"caught with nested (TypeError(2),)\n" +"caught with nested (OSError(3), OSError(4))\n" +" + Exception Group Traceback (most recent call last):\n" +" | File \"\", line 2, in \n" +" | raise ExceptionGroup(\"eg\",\n" +" | [ValueError(1), TypeError(2), OSError(3), OSError(4)])\n" +" | ExceptionGroup: eg (1 sub-exception)\n" +" +-+---------------- 1 ----------------\n" +" | ValueError: 1\n" +" +------------------------------------" msgid "" "If the exception raised from the :keyword:`try` block is not an exception " @@ -538,7 +580,7 @@ msgid "" msgstr "" "Wenn die im Block :keyword:`try` ausgelöste Ausnahme keine " "Ausnahmegruppe ist und ihr Typ mit einer der Klauseln :keyword:`!except*` " -"; übereinstimmt, wird sie abgefangen und von einer Ausnahmegruppe mit einer " +" übereinstimmt, wird sie abgefangen und von einer Ausnahmegruppe mit einer " "leeren Meldungszeichenfolge umschlossen. Dadurch wird sichergestellt, dass " "der Typ des Ziels ``e`` durchgehend :exc:`BaseExceptionGroup` lautet" " ::" @@ -551,6 +593,12 @@ msgid "" "...\n" "ExceptionGroup('', (BlockingIOError(),))" msgstr "" +">>> try:\n" +"... raise BlockingIOError\n" +"... except* BlockingIOError as e:\n" +"... print(repr(e))\n" +"...\n" +"ExceptionGroup('', (BlockingIOError(),))" msgid "" ":keyword:`break`, :keyword:`continue` and :keyword:`return` cannot appear in" @@ -612,6 +660,11 @@ msgid "" " finally:\n" " return 42" msgstr "" +"def f():\n" +" try:\n" +" 1/0\n" +" finally:\n" +" return 42" msgid "" "The exception information is not available to the program during execution " @@ -629,7 +682,7 @@ msgstr "" "Wenn eine Anweisung vom Typ :keyword:`return`, :keyword:`break` oder" " :keyword:`continue` innerhalb der :keyword:`try` -Suite einer " "Anweisung vom Typ :keyword:`!try`...\\ :keyword:`!finally` ausgeführt " -"wird, wird die :keyword:`!finally` -Klausel ebenfalls \"beim Verlassen\"; " +"wird, wird die :keyword:`!finally` -Klausel ebenfalls \"beim Verlassen\" " "ausgeführt." msgid "" @@ -643,7 +696,7 @@ msgstr "" ":keyword:`return` -Anweisung bestimmt. Da die :keyword:`!finally` " "-Klausel immer ausgeführt wird, ist eine in der :keyword:`!finally` " "-Klausel ausgeführte :keyword:`!return` -Anweisung immer die zuletzt " -"ausgeführte. Die folgende Funktion gibt \"finally\"; zurück." +"ausgeführte. Die folgende Funktion gibt \"finally\" zurück." msgid "" "def foo():\n" @@ -652,6 +705,11 @@ msgid "" " finally:\n" " return 'finally'" msgstr "" +"def foo():\n" +" try:\n" +" return 'try'\n" +" finally:\n" +" return 'finally'" msgid "" "Prior to Python 3.8, a :keyword:`continue` statement was illegal in the " @@ -689,7 +747,7 @@ msgid "" "The execution of the :keyword:`with` statement with one \"item\" proceeds as" " follows:" msgstr "" -"Die Ausführung der Anweisung :keyword:`with` mit einem \"Element\"; " +"Die Ausführung der Anweisung :keyword:`with` mit einem \"Element\" " "verläuft wie folgt:" msgid "" @@ -730,6 +788,11 @@ msgid "" "during the assignment to the target list, it will be treated the same as an " "error occurring within the suite would be. See step 7 below." msgstr "" +"Die :keyword:`with`-Anweisung garantiert, dass :meth:`~object.__exit__` " +"stets aufgerufen wird, sofern die Methode :meth:`~object.__enter__` " +"fehlerfrei zurückkehrt. Tritt also während der Zuweisung an die " +"Ziel-Liste ein Fehler auf, so wird dieser genauso behandelt wie ein " +"Fehler innerhalb des Anweisungsblocks. Siehe Schritt 7 weiter unten." msgid "The suite is executed." msgstr "Die Suite wurde aufgeführt." @@ -742,7 +805,7 @@ msgid "" msgstr "" "Die Methode :meth:`~object.__exit__` des Kontextmanagers wird " "aufgerufen. Wenn eine Ausnahme zum Abbruch der Suite geführt hat, werden " -"deren Typ, Wert und Traceback als Argumente an :meth:`~object.__exit__`` " +"deren Typ, Wert und Traceback als Argumente an :meth:`~object.__exit__` " "übergeben. Andernfalls werden drei Argumente vom Typ :const:`None` " "übergeben." @@ -774,6 +837,8 @@ msgid "" "with EXPRESSION as TARGET:\n" " SUITE" msgstr "" +"with EXPRESSION as TARGET:\n" +" SUITE" msgid "is semantically equivalent to::" msgstr "ist semantisch gleichbedeutend mit::" @@ -796,6 +861,22 @@ msgid "" " if not hit_except:\n" " exit(None, None, None)" msgstr "" +"manager = (EXPRESSION)\n" +"enter = manager.__enter__\n" +"exit = manager.__exit__\n" +"value = enter()\n" +"hit_except = False\n" +"\n" +"try:\n" +" TARGET = value\n" +" SUITE\n" +"except:\n" +" hit_except = True\n" +" if not exit(*sys.exc_info()):\n" +" raise\n" +"finally:\n" +" if not hit_except:\n" +" exit(None, None, None)" msgid "" "except that implicit :ref:`special method lookup ` is used " @@ -816,12 +897,17 @@ msgid "" "with A() as a, B() as b:\n" " SUITE" msgstr "" +"with A() as a, B() as b:\n" +" SUITE" msgid "" "with A() as a:\n" " with B() as b:\n" " SUITE" msgstr "" +"with A() as a:\n" +" with B() as b:\n" +" SUITE" msgid "" "You can also write multi-item context managers in multiple lines if the " @@ -837,6 +923,11 @@ msgid "" "):\n" " SUITE" msgstr "" +"with (\n" +" A() as a,\n" +" B() as b,\n" +"):\n" +" SUITE" msgid "Support for multiple context expressions." msgstr "Unterstützung für mehrere Kontext-Ausdrücke." @@ -859,7 +950,7 @@ msgstr "" "Anweisung :keyword:`with` ." msgid "The :keyword:`!match` statement" -msgstr "Die Erklärung der :keyword:`!match` " +msgstr "Die Erklärung der :keyword:`!match` Anweisung" msgid "The match statement is used for pattern matching. Syntax:" msgstr "Die \"match\"-Anweisung dient zum Musterabgleich. Syntax:" @@ -976,7 +1067,7 @@ msgstr "" msgid "If there are no further case blocks, the match statement is completed." msgstr "" "Wenn keine weiteren Fallblöcke mehr vorhanden sind, ist die " - \"match\"-Anweisung abgeschlossen." +"\"match\"-Anweisung abgeschlossen." msgid "" "Users should generally never rely on a pattern being evaluated. Depending " @@ -1065,7 +1156,7 @@ msgid "" "If the ``guard`` condition evaluates as false, the case block is not " "selected." msgstr "" -"Wenn die Bedingung ``guard`` als \"falsch\"; ausgewertet wird, wird der " +"Wenn die Bedingung ``guard`` als \"falsch\" ausgewertet wird, wird der " \"case\"-Block nicht ausgewählt." msgid "" @@ -1265,8 +1356,8 @@ msgid "" "operator is used." msgstr "" "Einfach ausgedrückt: ``LITERAL`` ist nur dann erfolgreich, wenn " -"`` == LITERAL`` . Für die Singletons ``None``, ``True`` " -"und ``False`` wird der Operator :keyword:`is` verwendet." +"`` == LITERAL`` . Für die einmaligen Objekte (Singleton) " +"``None``, ``True`` und ``False`` wird der Operator :keyword:`is` verwendet." msgid "Capture Patterns" msgstr "Erfassungsmuster / Capture-Muster" @@ -1434,7 +1525,7 @@ msgstr "" msgid "" "If the subject value is not a sequence [#]_, the sequence pattern fails." msgstr "" -"Ist der Wert des Subjekts kein Sequenz [#]_, schlägt das Sequenzmuster fehl." +"Ist der Wert des Subjekts keine Sequenz [#]_, schlägt das Sequenzmuster fehl." msgid "" "If the subject value is an instance of ``str``, ``bytes`` or ``bytearray`` " @@ -1844,8 +1935,8 @@ msgstr "``isinstance(, CLS)``" msgid "convert ``P1`` to a keyword pattern using ``CLS.__match_args__``" msgstr "" -"``P1`` mithilfe von in ein Schlüsselwortmuster umwandeln " -"``CLS.__match_args__``" +"``P1`` mithilfe von ``CLS.__match_args__`` in ein Schlüsselwortmuster " +"umwandeln " msgid "For each keyword argument ``attr=P2``:" msgstr "Für jedes Schlüsselwortargument ``attr=P2``:" @@ -1974,7 +2065,7 @@ msgid "" msgstr "" "Wenn ein oder mehrere :term:`Parameter ` die Form *Parameter* " "``=`` *Ausdruck* haben, spricht man davon, dass die Funktion " - \"Standardparameterwerte\"; besitzt. Bei einem Parameter mit einem Standardwert" +"\"Standardparameterwerte\"; besitzt. Bei einem Parameter mit einem Standardwert" " kann das entsprechende :term:`Argument` bei einem Aufruf weggelassen " "werden; in diesem Fall wird der Standardwert des Parameters eingesetzt. " "Wenn ein Parameter einen Standardwert hat, müssen auch alle nachfolgenden " @@ -1997,8 +2088,8 @@ msgstr "" "**Standardparameterwerte werden bei der Ausführung der Funktionsdefinition " "von links nach rechts ausgewertet.** Das bedeutet, dass der Ausdruck " "einmalig bei der Definition der Funktion ausgewertet wird und dass bei jedem" -" Aufruf derselbe \"vorberechnete\"; Wert verwendet wird. Dies ist besonders " -"wichtig zu verstehen, wenn ein Standardparameterwert ein veränderbliches " +" Aufruf derselbe \"vorberechnete\" Wert verwendet wird. Dies ist besonders " +"wichtig zu verstehen, wenn ein Standardparameterwert ein veränderliches " "Objekt ist, wie beispielsweise eine Liste oder ein Wörterbuch: Wenn die " "Funktion das Objekt verändert (z. B. durch Anhängen eines Elements an eine " "Liste), wird der Standardparameterwert faktisch verändert. Dies ist in der " @@ -2190,6 +2281,8 @@ msgid "" "class Foo:\n" " pass" msgstr "" +"class Foo:\n" +" pass" msgid "is equivalent to ::" msgstr "entspricht ::" @@ -2198,6 +2291,8 @@ msgid "" "class Foo(object):\n" " pass" msgstr "" +"class Foo(object):\n" +" pass" msgid "" "The class's suite is then executed in a new execution frame (see " @@ -2227,7 +2322,7 @@ msgid "" "using the definition syntax." msgstr "" "Die Reihenfolge, in der die Attribute im Klassenkörper definiert sind, " -"bleibt im :attr:`~type.__dict__`` der neuen Klasse erhalten. Beachten Sie," +"bleibt im :attr:`~type.__dict__` der neuen Klasse erhalten. Beachten Sie," " dass dies nur unmittelbar nach der Erstellung der Klasse und nur für " "Klassen gilt, die mithilfe der Definitionssyntax definiert wurden." @@ -2248,11 +2343,16 @@ msgid "" "@f2\n" "class Foo: pass" msgstr "" +"@f1(arg)\n" +"@f2\n" +"class Foo: pass" msgid "" "class Foo: pass\n" "Foo = f1(arg)(f2(Foo))" msgstr "" +"class Foo: pass\n" +"Foo = f1(arg)(f2(Foo))" msgid "" "The evaluation rules for the decorator expressions are the same as for " @@ -2489,6 +2589,22 @@ msgid "" " if not hit_except:\n" " await aexit(None, None, None)" msgstr "" +"manager = (EXPRESSION)\n" +"aenter = manager.__aenter__\n" +"aexit = manager.__aexit__\n" +"value = await aenter()\n" +"hit_except = False\n" +"\n" +"try:\n" +" TARGET = value\n" +" SUITE\n" +"except:\n" +" hit_except = True\n" +" if not await aexit(*sys.exc_info()):\n" +" raise\n" +"finally:\n" +" if not hit_except:\n" +" await aexit(None, None, None)" msgid "" "except that implicit :ref:`special method lookup ` is used " @@ -2502,7 +2618,7 @@ msgid "" "It is a :exc:`SyntaxError` to use an ``async with`` statement outside the " "body of a coroutine function." msgstr "" -"Es ist ein :exc:`SyntaxError`, eine ``async with`` `-Anweisung " +"Es ist ein :exc:`SyntaxError`, eine ``async with`` -Anweisung " "außerhalb des Körpers einer Coroutine-Funktion zu verwenden." msgid ":pep:`492` - Coroutines with async and await syntax" @@ -2547,6 +2663,20 @@ msgid "" "\n" "type ListOrSet[T] = list[T] | set[T]" msgstr "" +"def max[T](args: list[T]) -> T:\n" +" ...\n" +"\n" +"async def amax[T](args: list[T]) -> T:\n" +" ...\n" +"\n" +"class Bag[T]:\n" +" def __iter__(self) -> Iterator[T]:\n" +" ...\n" +"\n" +" def add(self, arg: T) -> None:\n" +" ...\n" +"\n" +"type ListOrSet[T] = list[T] | set[T]" msgid "" "Semantically, this indicates that the function, class, or type alias is " @@ -2705,6 +2835,20 @@ msgid "" " *e: SimpleTypeVarTuple,\n" "): ..." msgstr "" +"def overly_generic[\n" +" SimpleTypeVar,\n" +" TypeVarWithDefault = int,\n" +" TypeVarWithBound: int,\n" +" TypeVarWithConstraints: (str, bytes),\n" +" *SimpleTypeVarTuple = (int, float),\n" +" **SimpleParamSpec = (str, bytearray),\n" +"](\n" +" a: SimpleTypeVar,\n" +" b: TypeVarWithDefault,\n" +" c: TypeVarWithBound,\n" +" d: Callable[SimpleParamSpec, TypeVarWithConstraints],\n" +" *e: SimpleTypeVarTuple,\n" +"): ..." msgid "Generic functions" msgstr "Generische Funktionen" @@ -2726,6 +2870,12 @@ msgid "" " return func\n" "func = TYPE_PARAMS_OF_func()" msgstr "" +"annotation-def TYPE_PARAMS_OF_func():\n" +" T = typing.TypeVar(\"T\")\n" +" def func(arg: T): ...\n" +" func.__type_params__ = (T,)\n" +" return func\n" +"func = TYPE_PARAMS_OF_func()" msgid "" "Here ``annotation-def`` indicates an :ref:`annotation scope ` of the " @@ -2835,6 +2988,13 @@ msgid "" " return Bag\n" "Bag = TYPE_PARAMS_OF_Bag()" msgstr "" +"annotation-def TYPE_PARAMS_OF_Bag():\n" +" T = typing.TypeVar(\"T\")\n" +" class Bag(typing.Generic[T]):\n" +" __type_params__ = (T,)\n" +" ...\n" +" return Bag\n" +"Bag = TYPE_PARAMS_OF_Bag()" msgid "" "Here again ``annotation-def`` (not a real keyword) indicates an " @@ -2876,6 +3036,13 @@ msgid "" " return Bag\n" "Bag = decorator(TYPE_PARAMS_OF_Bag())" msgstr "" +"annotation-def TYPE_PARAMS_OF_Bag():\n" +" T = typing.TypeVar(\"T\")\n" +" class Bag(Base[T], typing.Generic[T], arg=T):\n" +" __type_params__ = (T,)\n" +" ...\n" +" return Bag\n" +"Bag = decorator(TYPE_PARAMS_OF_Bag())" msgid "Generic type aliases" msgstr "Generische Typaliase" @@ -3039,7 +3206,7 @@ msgstr "" "definiert:" msgid "a class that inherits from :class:`collections.abc.Sequence`" -msgstr "eine Klasse, die von … ableitet :class:`collections.abc.Sequence`" +msgstr "eine Klasse, die sich von :class:`collections.abc.Sequence` ableitet" msgid "" "a Python class that has been registered as :class:`collections.abc.Sequence`" @@ -3085,11 +3252,11 @@ msgstr "" " definiert:" msgid "a class that inherits from :class:`collections.abc.Mapping`" -msgstr "eine Klasse, die von … ableitet :class:`collections.abc.Mapping`" +msgstr "eine Klasse, die sich von :class:`collections.abc.Mapping` ableitet" msgid "" "a Python class that has been registered as :class:`collections.abc.Mapping`" -msgstr "eine Python-Klasse, die als :class:`collections.abc.Mapping`" +msgstr "eine Python-Klasse, die als :class:`collections.abc.Mapping` regisirtiert wurde" msgid "" "a builtin class that has its (CPython) :c:macro:`Py_TPFLAGS_MAPPING` bit set" From 1caee576ecf77e1319b5c830083794b1f12f54b3 Mon Sep 17 00:00:00 2001 From: JystBreisgau Date: Sun, 23 Aug 2026 14:44:31 +0200 Subject: [PATCH 8/8] Revise German translations in /reference/simple_stmts.po Updated German translations for various programming terms and statements in the documentation. --- reference/simple_stmts.po | 111 ++++++++++++++++++++++++-------------- 1 file changed, 72 insertions(+), 39 deletions(-) diff --git a/reference/simple_stmts.po b/reference/simple_stmts.po index 124b368b..f8c933bf 100644 --- a/reference/simple_stmts.po +++ b/reference/simple_stmts.po @@ -23,7 +23,7 @@ msgstr "" msgid "Simple statements" -msgstr "Einfache Aussagen" +msgstr "Einfache Anweisungen" msgid "" "A simple statement is comprised within a single logical line. Several simple" @@ -93,7 +93,7 @@ msgid "" "tuple) and assigns the single resulting object to each of the target lists, " "from left to right." msgstr "" -"Eine Zuweisungsanweisung wertet die Ausdrucksliste aus (beachten Sie, dass " +"Eine Zuweisungsanweisung wertet die Ausdrucksliste aus (beachte, dass " "es sich dabei um einen einzelnen Ausdruck oder eine durch Kommas getrennte " "Liste handeln kann, wobei Letztere ein Tupel ergibt) und weist das einzelne " "resultierende Objekt nacheinander von links nach rechts jeder der Ziellisten" @@ -230,7 +230,7 @@ msgstr "" " die Attributreferenz auf beiden Seiten des Zuweisungsoperators, kann der " "Ausdruck auf der rechten Seite, ``a.x``, entweder auf ein Instanzattribut " "oder (falls kein Instanzattribut vorhanden ist) auf ein Klassenattribut " -"zugreifen. Das Ziel auf der linken Seite, ``a.x`` `, wird immer als " +"zugreifen. Das Ziel auf der linken Seite, ``a.x``, wird immer als " "Instanzattribut gesetzt und bei Bedarf angelegt. Daher beziehen sich die " "beiden Vorkommen von ``a.x`` nicht unbedingt auf dasselbe Attribut: Wenn" " sich der Ausdruck auf der rechten Seite auf ein Klassenattribut bezieht, " @@ -242,13 +242,17 @@ msgid "" "inst = Cls()\n" "inst.x = inst.x + 1 # writes inst.x as 4 leaving Cls.x as 3" msgstr "" +"class Cls:\n" +" x = 3 # class variable\n" +"inst = Cls()\n" +"inst.x = inst.x + 1 # writes inst.x as 4 leaving Cls.x as 3" msgid "" "This description does not necessarily apply to descriptor attributes, such " "as properties created with :deco:`property`." msgstr "" "Diese Beschreibung gilt nicht unbedingt für Deskriptorattribute, wie " -"beispielsweise Eigenschaften, die mit :deco:`property`` erstellt wurden." +"beispielsweise Eigenschaften, die mit :deco:`property` erstellt wurden." msgid "" "If the target is a subscription: The primary expression in the reference is " @@ -318,7 +322,7 @@ msgid "" "changing the length of the target sequence, if the target sequence allows " "it." msgstr "" -"Wenn das Ziel ein Slicing ist: Der primäre Ausdruck sollte zu einem " +"Wenn das Ziel ein Schnittmuster (Slicing) ist: Der primäre Ausdruck sollte zu einem " "veränderbaren Sequenzobjekt (z. B. einer Liste) ausgewertet werden. Das " "zuweisende Objekt sollte :term:`iterable` sein. Die untere und obere Grenze " "des Slicings sollten Ganzzahlen sein; sind sie ``None`` (oder fehlen ganz), " @@ -339,7 +343,7 @@ msgid "" " For instance, the following program prints ``[0, 2]``::" msgstr "" "Obwohl die Definition der Zuweisung impliziert, dass Überschneidungen " -"zwischen der linken und der rechten Seite \"gleichzeitig\"; stattfinden " +"zwischen der linken und der rechten Seite \"gleichzeitig\" stattfinden " "(beispielsweise tauscht ``a, b = b, a`` zwei Variablen aus), erfolgen " "Überschneidungen *innerhalb* der Menge der Variablen, denen Werte zugewiesen" " werden, von links nach rechts, was manchmal zu Verwirrung führt. So gibt " @@ -351,6 +355,10 @@ msgid "" "i, x[i] = 1, 2 # i is updated, then x[i] is updated\n" "print(x)" msgstr "" +"x = [0, 1]\n" +"i = 0\n" +"i, x[i] = 1, 2 # Zuerst wird i aktualisiert, dann x[i]\n" +"print(x)" msgid ":pep:`3132` - Extended Iterable Unpacking" msgstr ":pep:`3132` - Erweitertes Entpacken von Iterables" @@ -552,7 +560,7 @@ msgid "" "Assert statements are a convenient way to insert debugging assertions into a" " program:" msgstr "" -"\"Assert\"-Anweisungen sind eine praktische Möglichkeit, Debugging-Prüfungen " +"\"Prüf\"-Anweisungen (Assert) sind eine praktische Möglichkeit, Debugging-Prüfungen " "in ein Programm einzufügen:" msgid "The simple form, ``assert expression``, is equivalent to ::" @@ -564,6 +572,8 @@ msgid "" "if __debug__:\n" " if not expression: raise AssertionError" msgstr "" +"if __debug__:\n" +" if not expression: raise AssertionError" msgid "" "The extended form, ``assert expression1, expression2``, is equivalent to ::" @@ -574,6 +584,8 @@ msgid "" "if __debug__:\n" " if not expression1: raise AssertionError(expression2)" msgstr "" +"if __debug__:\n" +" if not expression1: raise AssertionError(expression2)" msgid "" "These equivalences assume that :const:`__debug__` and :exc:`AssertionError` " @@ -621,6 +633,9 @@ msgid "" "\n" "class C: pass # a class with no methods (yet)" msgstr "" +"def f(arg): pass # eine Funktion, die (noch) nichts tut\n" +"\n" +"class C: pass # eine Klasse (bisher) ohne Methoden" msgid "The :keyword:`!del` statement" msgstr "Die :keyword:`!del` Anweisung" @@ -647,8 +662,8 @@ msgid "" msgstr "" "Durch das Löschen eines Namens wird die Bindung dieses Namens aus dem " "lokalen oder globalen Namensraum entfernt, je nachdem, ob der Name in einer " -"` :keyword:`global` `-Anweisung im selben Codeblock vorkommt. Der Versuch, " -"einen ungebundenen Namen zu löschen, löst eine :exc:`NameError` `-Ausnahme" +"` :keyword:`global` -Anweisung im selben Codeblock vorkommt. Der Versuch, " +"einen ungebundenen Namen zu löschen, löst eine :exc:`NameError` -Ausnahme" " aus." msgid "" @@ -659,8 +674,9 @@ msgid "" msgstr "" "Das Löschen von Attributverweisen und Abonnements wird an das betroffene " "Primärobjekt weitergeleitet; das Löschen eines Slices entspricht im " -"Allgemeinen der Zuweisung eines leeren Slices des richtigen Typs (doch " -"selbst dies wird durch das geslicete Objekt bestimmt)." +"Allgemeinen der Zuweisung eines leeren Slices des richtigen Typs " +"(wobei auch dies vom Objekt bestimmt wird, auf das der Slice-Vorgang " +"angewendet wird)." msgid "" "Previously it was illegal to delete a name from the local namespace if it " @@ -747,8 +763,8 @@ msgid "" "yield \n" "yield from " msgstr "" -"Ertrag \n" -"Ertrag aus " +"yield \n" +"yield from " msgid "are equivalent to the yield expression statements ::" msgstr "entsprechen den folgenden \"yield\"-Anweisungen ::" @@ -757,6 +773,8 @@ msgid "" "(yield )\n" "(yield from )" msgstr "" +"(yield )\n" +"(yield from )" msgid "" "Yield expressions and statements are only used when defining a " @@ -775,7 +793,7 @@ msgid "" "For full details of :keyword:`yield` semantics, refer to the " ":ref:`yieldexpr` section." msgstr "" -"Ausführliche Informationen zur Semantik von :keyword:`yield` finden Sie" +"Ausführliche Informationen zur Semantik von :keyword:`yield` findest du" " im Abschnitt :ref:`yieldexpr` ." msgid "The :keyword:`!raise` statement" @@ -822,9 +840,9 @@ msgid "" msgstr "" "Ein Traceback-Objekt wird normalerweise automatisch erstellt, wenn eine " "Ausnahme ausgelöst wird, und dieser als Attribut " -":attr:`~BaseException.__traceback__` zugeordnet. Sie können eine Ausnahme " -"erstellen und in einem Schritt Ihr eigenes Traceback festlegen, indem Sie " -"die Ausnahmemethode :meth:`~BaseException.with_traceback` verwenden " +":attr:`~BaseException.__traceback__` zugeordnet. Du kannst eine Ausnahme " +"erstellen und in einem Schritt dein eigenes Traceback festlegen, indem du " +"die Ausnahmemethode :meth:`~BaseException.with_traceback` verwendest " "(die dieselbe Ausnahminstanz zurückgibt, wobei deren Traceback auf das " "übergebene Argument gesetzt wird), und zwar wie folgt::" @@ -956,13 +974,21 @@ msgid "" " File \"\", line 4, in \n" "RuntimeError: Something bad happened" msgstr "" +">>> try:\n" +"... print(1 / 0)\n" +"... except:\n" +"... raise RuntimeError(\"Something bad happened\") from None\n" +"...\n" +"Traceback (most recent call last):\n" +" File \"\", line 4, in \n" +"RuntimeError: Something bad happened" msgid "" "Additional information on exceptions can be found in section " ":ref:`exceptions`, and information about handling exceptions is in section " ":ref:`try`." msgstr "" -"Weitere Informationen zu Ausnahmen finden Sie im Abschnitt " +"Weitere Informationen zu Ausnahmen findest du im Abschnitt " ":ref:`exceptions`, Informationen zur Behandlung von Ausnahmen im Abschnitt " ":ref:`try`." @@ -1070,7 +1096,7 @@ msgstr "" "Definiert einen oder mehrere Namen im aktuellen Namensraum für den " "Gültigkeitsbereich, in dem die Anweisung :keyword:`import` auftritt, " "genau wie es eine Zuweisungsanweisung tun würde (einschließlich der Semantik" -" von :keyword:`global` und :keyword:`nonlocal` \".." +" von :keyword:`global` und :keyword:`nonlocal`) ." msgid "" "When the statement contains multiple clauses (separated by commas) the two " @@ -1090,11 +1116,11 @@ msgid "" "could not be located, *or* that an error occurred while initializing the " "module, which includes execution of the module's code." msgstr "" -"Die Einzelheiten des ersten Schritts – das Auffinden und Laden von Modulen –" +"Die Einzelheiten des ersten Schritts – das Auffinden und Laden von Modulen " " werden im Abschnitt über das :ref:`Import-System ` " "ausführlicher beschrieben. Dort werden auch die verschiedenen Arten von " "Paketen und Modulen erläutert, die importiert werden können, sowie alle " -"Hooks, mit denen sich das Import-System anpassen lässt. Beachten Sie, dass " +"Hooks, mit denen sich das Import-System anpassen lässt. Beachte, dass " "Fehler in diesem Schritt entweder darauf hindeuten können, dass das Modul " "nicht gefunden werden konnte, *oder* dass bei der Initialisierung des Moduls" " ein Fehler aufgetreten ist, wozu auch die Ausführung des Modulcodes gehört." @@ -1136,8 +1162,7 @@ msgstr "" msgid "The :keyword:`from` form uses a slightly more complex process:" msgstr "" -"Das Formular :keyword:`from` (Antrag auf eine vorläufige " -"Aufenthaltsgenehmigung) sieht einen etwas komplexeren Ablauf vor:" +"Das Formular :keyword:`from` sieht einen etwas komplexeren Ablauf vor:" msgid "" "find the module specified in the :keyword:`from` clause, loading and " @@ -1158,8 +1183,8 @@ msgid "" "if not, attempt to import a submodule with that name and then check the " "imported module again for that attribute" msgstr "" -"Falls nicht, versuchen Sie, ein Submodul mit diesem Namen zu importieren, " -"und überprüfen Sie anschließend das importierte Modul erneut auf dieses " +"Falls nicht, versuche ein Submodul mit diesem Namen zu importieren, " +"und überprüfe anschließend das importierte Modul erneut auf dieses " "Attribut." msgid "if the attribute is not found, :exc:`ImportError` is raised." @@ -1186,6 +1211,11 @@ msgid "" "from foo.bar import baz # foo, foo.bar, and foo.bar.baz imported, foo.bar.baz bound as baz\n" "from foo import attr # foo imported and foo.attr bound as attr" msgstr "" +"import foo # foo imported and bound locally\n" +"import foo.bar.baz # foo, foo.bar, and foo.bar.baz imported, foo bound locally\n" +"import foo.bar.baz as fbb # foo, foo.bar, and foo.bar.baz imported, foo.bar.baz bound as fbb\n" +"from foo.bar import baz # foo, foo.bar, and foo.bar.baz imported, foo.bar.baz bound as baz\n" +"from foo import attr # foo imported and foo.attr bound as attr" msgid "" "If the list of identifiers is replaced by a star (``'*'``), all public names" @@ -1216,7 +1246,7 @@ msgstr "" "Zeichenketten handeln, bei denen es sich um Namen handelt, die von diesem " "Modul definiert oder importiert wurden. Namen, die Nicht-ASCII-Zeichen " "enthalten, müssen in der `Normalisierungsform`_ NFKC vorliegen; Einzelheiten" -" finden Sie unter :ref:`lexical-names-nonascii`. Die in ``__all__`` " +" findest du unter :ref:`lexical-names-nonascii`. Die in ``__all__`` " "aufgeführten Namen gelten alle als öffentlich und müssen vorhanden sein. " "Ist ``__all__`` nicht definiert, umfasst die Menge der öffentlichen " "Namen alle Namen im Namensraum des Moduls, die nicht mit einem Unterstrich " @@ -1249,20 +1279,20 @@ msgid "" "``pkg.subpkg2.mod``. The specification for relative imports is contained in " "the :ref:`relativeimports` section." msgstr "" -"Bei der Angabe des zu importierenden Moduls müssen Sie nicht den absoluten " +"Bei der Angabe des zu importierenden Moduls musst du nicht den absoluten " "Namen des Moduls angeben. Befindet sich ein Modul oder Paket in einem " "anderen Paket, ist es möglich, innerhalb desselben obersten Pakets einen " "relativen Import durchzuführen, ohne den Paketnamen anzugeben. Durch die " "Verwendung von führenden Punkten im angegebenen Modul oder Paket nach " -":keyword:`from` können Sie festlegen, wie weit Sie in der aktuellen " -"Pakethierarchie nach oben navigieren möchten, ohne genaue Namen angeben zu " +":keyword:`from` kannst du festlegen, wie weit du in der aktuellen " +"Pakethierarchie nach oben navigieren möchtest, ohne genaue Namen angeben zu " "müssen. Ein führender Punkt bedeutet das aktuelle Paket, in dem sich das " "Modul befindet, das den Import durchführt. Zwei Punkte bedeuten eine " -"Paketebene höher. Drei Punkte bedeuten zwei Ebenen nach oben usw. Wenn Sie " +"Paketebene höher. Drei Punkte bedeuten zwei Ebenen nach oben usw. Wenn du " "also ``from . import mod`` aus einem Modul im Paket ``pkg`` " -"ausführen, importieren Sie letztendlich ``pkg.mod``. Wenn Sie ``from " -"..subpkg2 import mod`` aus dem Paket ``pkg.subpkg1`` ausführen, " -"importieren Sie ``pkg.subpkg2.mod``. Die Spezifikation für relative " +"ausführst, importiere letztendlich ``pkg.mod``. Wenn du ``from " +"..subpkg2 import mod`` aus dem Paket ``pkg.subpkg1`` ausführst, " +"importiere ``pkg.subpkg2.mod``. Die Spezifikation für relative " "Importe ist im Abschnitt :ref:`relativeimports` enthalten." msgid "" @@ -1341,7 +1371,7 @@ msgid "" msgstr "" "Alle historischen Funktionen, die durch die \"future\"-Anweisung aktiviert " "werden, werden von Python 3 weiterhin erkannt. Dazu gehören " -"\"``absolute_import``, ``division``, ``generators``, " +"``absolute_import``, ``division``, ``generators``, " "``generator_stop``, ``unicode_literals``, ``print_function``, " " ``nested_scopes`` und ``with_statement`` . Sie sind alle überflüssig," " da sie immer aktiviert sind, und werden nur aus Gründen der " @@ -1390,7 +1420,7 @@ msgstr "" "durch die \"future\"-Anweisung aktiviert wird." msgid "Note that there is nothing special about the statement::" -msgstr "Beachten Sie, dass an dieser Aussage nichts Besonderes ist::" +msgstr "Beachte, dass an dieser Aussage nichts Besonderes ist::" msgid "import __future__ [as name]" msgstr "" @@ -1414,7 +1444,7 @@ msgstr "" "vorkommen, das eine \"future\"-Anweisung enthält, verwendet standardmäßig die " "neue Syntax bzw. Semantik, die mit der \"future\"-Anweisung verbunden ist. " "Dies kann durch optionale Argumente an :func:`compile` gesteuert werden " -"– Einzelheiten finden Sie in der Dokumentation dieser Funktion." +"– Einzelheiten findest du in der Dokumentation dieser Funktion." msgid "" "A future statement typed at an interactive interpreter prompt will take " @@ -1470,7 +1500,7 @@ msgid "" "is relaxed in the interactive prompt (:term:`REPL`)." msgstr "" "Auf Modulebene sind alle Variablen global, sodass eine :keyword:`!global` " -"`-Anweisung keine Wirkung hat. Variablen dürfen jedoch dennoch nicht " +"-Anweisung keine Wirkung hat. Variablen dürfen jedoch dennoch nicht " "verwendet oder zugewiesen werden, bevor sie mit :keyword:`!global` " "deklariert wurden. Diese Vorschrift wird in der interaktiven " "Eingabeaufforderung (:term:`REPL`) gelockert." @@ -1560,7 +1590,7 @@ msgid "For example, the following statement creates a type alias::" msgstr "Die folgende Anweisung erstellt beispielsweise einen Typalias::" msgid "type Point = tuple[float, float]" -msgstr "" +msgstr "type Point = tuple[float, float]" msgid "This code is roughly equivalent to::" msgstr "Dieser Code entspricht in etwa folgendem:" @@ -1570,6 +1600,9 @@ msgid "" " return tuple[float, float]\n" "Point = typing.TypeAliasType(\"Point\", VALUE_OF_Point())" msgstr "" +"annotation-def VALUE_OF_Point():\n" +" return tuple[float, float]\n" +"Point = typing.TypeAliasType(\"Point\", VALUE_OF_Point())" msgid "" "``annotation-def`` indicates an :ref:`annotation scope `," @@ -1604,7 +1637,7 @@ msgid ":keyword:`!type` is a :ref:`soft keyword `." msgstr ":keyword:`!type` ist ein :ref:`Soft-Schlüsselwort `." msgid ":pep:`695` - Type Parameter Syntax" -msgstr "" +msgstr ":pep:`695` - Type Parameter Syntax" msgid "" "Introduced the :keyword:`!type` statement and syntax for generic classes and"