-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathimport.po
More file actions
2174 lines (1971 loc) · 102 KB
/
Copy pathimport.po
File metadata and controls
2174 lines (1971 loc) · 102 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-08-22 12:07+0200\n"
"PO-Revision-Date: 2025-09-16 00:02+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../../reference/import.rst:6
msgid "The import system"
msgstr "Das Importsystem"
#: ../../reference/import.rst:10
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."
msgstr ""
"Python-Code in einem :term:`Modul <module>` erhält Zugriff auf den Code in "
"einem anderen Modul, indem er diesen :term:`importiert <importing>`. 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."
#: ../../reference/import.rst:16
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 "
"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 "
"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` ."
#: ../../reference/import.rst:25
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."
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."
#: ../../reference/import.rst:31
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."
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."
#: ../../reference/import.rst:36
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 "
"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."
#: ../../reference/import.rst:43
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 "
"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`)."
#: ../../reference/import.rst:51
msgid ":mod:`importlib`"
msgstr ":mod:`importlib`"
#: ../../reference/import.rst:53
msgid ""
"The :mod:`importlib` module provides a rich API for interacting with the "
"import system. For example :func:`importlib.import_module` provides a "
"recommended, simpler API than built-in :func:`__import__` for invoking the "
"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` ."
#: ../../reference/import.rst:62
msgid "Packages"
msgstr "Pakete"
#: ../../reference/import.rst:67
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 <package>`."
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 <package>`."
#: ../../reference/import.rst:72
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 "
"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."
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."
#: ../../reference/import.rst:80
msgid ""
"It's important to keep in mind that all packages are modules, but not all "
"modules are packages. Or put another way, packages are just a special kind "
"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."
#: ../../reference/import.rst:85
msgid ""
"All modules have a name. Subpackage names are separated from their parent "
"package name by a dot, akin to Python's standard attribute access syntax. "
"Thus you might have a package called :mod:`email`, which in turn has a "
"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."
#: ../../reference/import.rst:93
msgid "Regular packages"
msgstr "Reguläre Pakete"
#: ../../reference/import.rst:98
msgid ""
"Python defines two types of packages, :term:`regular packages <regular "
"package>` and :term:`namespace packages <namespace package>`. 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."
msgstr ""
"Python definiert zwei Arten von Paketen: :term:`reguläre Pakete <regular "
"package>` und :term:`Namespace-Pakete <namespace package>`. 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."
#: ../../reference/import.rst:108
msgid ""
"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::"
#: ../../reference/import.rst:111
msgid ""
"parent/\n"
" __init__.py\n"
" one/\n"
" __init__.py\n"
" two/\n"
" __init__.py\n"
" three/\n"
" __init__.py"
msgstr ""
"parent/\n"
" __init__.py\n"
" one/\n"
" __init__.py\n"
" two/\n"
" __init__.py\n"
" three/\n"
" __init__.py"
#: ../../reference/import.rst:120
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."
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."
#: ../../reference/import.rst:125
msgid ""
"A subdirectory inside a regular package that does not contain an ``__init__."
"py`` file is treated as an implicit :ref:`namespace package <reference-"
"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 "
"<reference-namespace-package>` (ein \"Namespace-Unterpaket\") behandelt, "
"dessen Stammverzeichnis das übergeordnete Paket ist. Die zugrunde liegende "
"Spezifikation finden Sie unter :pep:`420`."
#: ../../reference/import.rst:135
msgid "Namespace packages"
msgstr "Namespace-Pakete"
#: ../../reference/import.rst:141
msgid ""
"A namespace package is a composite of various :term:`portions <portion>`, "
"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 "
"<portion>`, 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."
#: ../../reference/import.rst:149
msgid ""
"Namespace packages do not use an ordinary list for their ``__path__`` "
"attribute. They instead use a custom iterable type which will automatically "
"perform a new search for package portions on the next import attempt within "
"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."
#: ../../reference/import.rst:155
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 ""
"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."
#: ../../reference/import.rst:162
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 <portion>`, "
"der zu einem Namespace-Unterpaket des umgebenden regulären Pakets beiträgt."
#: ../../reference/import.rst:168
msgid "See also :pep:`420` for the namespace package specification."
msgstr "Siehe auch :pep:`420` für die Spezifikation des Namespace-Pakets."
#: ../../reference/import.rst:172
msgid "Searching"
msgstr "Suchen"
#: ../../reference/import.rst:174
msgid ""
"To begin the search, Python needs the :term:`fully qualified <qualified "
"name>` name of the module (or package, but for the purposes of this "
"discussion, the difference is immaterial) being imported. This name may "
"come from various arguments to the :keyword:`import` statement, or from the "
"parameters to the :func:`importlib.import_module` or :func:`__import__` "
"functions."
msgstr ""
"Um die Suche zu starten, benötigt Python den :term:`vollständig "
"qualifizierten <qualified name>` 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."
#: ../../reference/import.rst:180
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."
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."
#: ../../reference/import.rst:187
msgid "The module cache"
msgstr "Der Modul-Cache"
#: ../../reference/import.rst:192
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 "
"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."
#: ../../reference/import.rst:199
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."
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."
#: ../../reference/import.rst:205
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`."
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."
#: ../../reference/import.rst:212
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 ""
"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."
#: ../../reference/import.rst:222
msgid "Finders and loaders"
msgstr "Finders und Loader"
#: ../../reference/import.rst:229
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 <finder>` and :term:"
"`loaders <loader>`. 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 <importer>` - "
"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 "
"<finder>` und :term:`loaders <loader>`. 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 <importer>` bezeichnet – sie "
"geben sich selbst zurück, wenn sie feststellen, dass sie das angeforderte "
"Modul laden können."
#: ../../reference/import.rst:237
msgid ""
"Python includes a number of default finders and importers. The first one "
"knows how to locate built-in modules, and the second knows how to locate "
"frozen modules. A third default finder searches an :term:`import path` for "
"modules. The :term:`import path` is a list of locations that may name file "
"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 <import path>` nach "
"Modulen. Der :term:`Importpfad <import path>` 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."
#: ../../reference/import.rst:244
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."
#: ../../reference/import.rst:247
msgid ""
"Finders do not actually load modules. If they can find the named module, "
"they return a :dfn:`module spec`, an encapsulation of the module's import-"
"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."
#: ../../reference/import.rst:251
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 "
"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."
#: ../../reference/import.rst:255
msgid ""
"In previous versions of Python, finders returned :term:`loaders <loader>` "
"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 "
"<loader>` zurück, während sie nun Modulspezifikationen zurückgeben, die "
"Loader *enthalten*. Loader werden beim Import weiterhin verwendet, haben "
"jedoch weniger Aufgaben."
#: ../../reference/import.rst:261
msgid "Import hooks"
msgstr "Import-Hooks"
#: ../../reference/import.rst:271
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 "
"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*."
#: ../../reference/import.rst:275
msgid ""
"Meta hooks are called at the start of import processing, before any other "
"import processing has occurred, other than :data:`sys.modules` cache look "
"up. This allows meta hooks to override :data:`sys.path` processing, frozen "
"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."
#: ../../reference/import.rst:281
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."
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."
#: ../../reference/import.rst:288
msgid "The meta path"
msgstr "Der Metapfad"
#: ../../reference/import.rst:294
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 "
"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."
#: ../../reference/import.rst:303
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 "
"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."
#: ../../reference/import.rst:309
msgid ""
"The :meth:`~importlib.abc.MetaPathFinder.find_spec` method of meta path "
"finders is called with two or three arguments. The first is the fully "
"qualified name of the module being imported, for example ``foo.bar.baz``. "
"The second argument is the path entries to use for the module search. For "
"top-level modules, the second argument is ``None``, but for submodules or "
"subpackages, the second argument is the value of the parent package's "
"``__path__`` attribute. If the appropriate ``__path__`` attribute cannot be "
"accessed, a :exc:`ModuleNotFoundError` is raised. The third argument is an "
"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."
#: ../../reference/import.rst:320
msgid ""
"The meta path may be traversed multiple times for a single import request. "
"For example, assuming none of the modules involved has already been cached, "
"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 ""
"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."
#: ../../reference/import.rst:330
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."
#: ../../reference/import.rst:334
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 "
"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 <import path>` importiert (d. h. den :term:"
"`pfadbasierten Finder <path based finder>`)."
#: ../../reference/import.rst:339
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`."
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."
#: ../../reference/import.rst:346
msgid ""
"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."
#: ../../reference/import.rst:350
msgid ""
":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`."
#: ../../reference/import.rst:356
msgid "Loading"
msgstr "Module laden"
#: ../../reference/import.rst:358
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:"
#: ../../reference/import.rst:362
msgid ""
"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"
"\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]"
msgstr ""
#: ../../reference/import.rst:386
msgid "Note the following details:"
msgstr "Beachte bitte folgende Details:"
#: ../../reference/import.rst:388
msgid ""
"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."
#: ../../reference/import.rst:391
msgid ""
"The module will exist in :data:`sys.modules` before the loader executes the "
"module code. This is crucial because the module code may (directly or "
"indirectly) import itself; adding it to :data:`sys.modules` beforehand "
"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."
#: ../../reference/import.rst:397
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`."
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."
#: ../../reference/import.rst:403
msgid ""
"After the module is created but before execution, the import machinery sets "
"the import-related module attributes (\"_init_module_attrs\" in the pseudo-"
"code example above), as summarized in a :ref:`later section <import-mod-"
"attrs>`."
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 <import-mod-attrs>` zusammengefasst."
#: ../../reference/import.rst:408
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."
#: ../../reference/import.rst:412
msgid ""
"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."
#: ../../reference/import.rst:415
msgid ""
"The import system has taken over the boilerplate responsibilities of "
"loaders. These were previously performed by the ``importlib.abc.Loader."
"load_module`` method."
msgstr ""
#: ../../reference/import.rst:420
msgid "The ``load_module`` method is no longer used."
msgstr ""
#: ../../reference/import.rst:424
msgid "Loaders"
msgstr "Modullader"
#: ../../reference/import.rst:426
msgid ""
"Module loaders provide the critical function of loading: module execution. "
"The import machinery calls the :meth:`importlib.abc.Loader.exec_module` "
"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."
#: ../../reference/import.rst:431
msgid "Loaders must satisfy the following requirements:"
msgstr "Lader müssen die folgenden Anforderungen erfüllen:"
#: ../../reference/import.rst:433
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__``)."
#: ../../reference/import.rst:437
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."
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."
#: ../../reference/import.rst:441
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``."
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."
#: ../../reference/import.rst:445
msgid ""
"Module loaders may opt in to creating the module object during loading by "
"implementing a :meth:`~importlib.abc.Loader.create_module` method. It takes "
"one argument, the module spec, and returns the new module object to use "
"during loading. ``create_module()`` does not need to set any attributes on "
"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."
#: ../../reference/import.rst:452
msgid "The :meth:`~importlib.abc.Loader.create_module` method of loaders."
msgstr ""
"Die :meth:`~importlib.abc.Loader.create_module`-Methode bei Modullader."
#: ../../reference/import.rst:455
msgid ""
"The ``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 ""
#: ../../reference/import.rst:460
msgid ""
"For compatibility with existing loaders, the import machinery will use the "
"``load_module()`` method of loaders if it exists and the loader does not "
"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."
#: ../../reference/import.rst:465
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:"
#: ../../reference/import.rst:469
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`."
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."
#: ../../reference/import.rst:475
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."
#: ../../reference/import.rst:479
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 "
"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."
#: ../../reference/import.rst:484
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."