Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
224b2612
Kaydet (Commit)
224b2612
authored
Kas 22, 2013
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
User the repr for a module name in more places
üst
873d1226
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
_bootstrap.py
Lib/importlib/_bootstrap.py
+6
-6
importlib.h
Python/importlib.h
+0
-0
No files found.
Lib/importlib/_bootstrap.py
Dosyayı görüntüle @
224b2612
...
...
@@ -526,7 +526,7 @@ def _requires_builtin(fxn):
"""Decorator to verify the named module is built-in."""
def
_requires_builtin_wrapper
(
self
,
fullname
):
if
fullname
not
in
sys
.
builtin_module_names
:
raise
ImportError
(
'{} is not a built-in module'
.
format
(
fullname
),
raise
ImportError
(
'{
!r
} is not a built-in module'
.
format
(
fullname
),
name
=
fullname
)
return
fxn
(
self
,
fullname
)
_wrap
(
_requires_builtin_wrapper
,
fxn
)
...
...
@@ -537,7 +537,7 @@ def _requires_frozen(fxn):
"""Decorator to verify the named module is frozen."""
def
_requires_frozen_wrapper
(
self
,
fullname
):
if
not
_imp
.
is_frozen
(
fullname
):
raise
ImportError
(
'{} is not a frozen module'
.
format
(
fullname
),
raise
ImportError
(
'{
!r
} is not a frozen module'
.
format
(
fullname
),
name
=
fullname
)
return
fxn
(
self
,
fullname
)
_wrap
(
_requires_frozen_wrapper
,
fxn
)
...
...
@@ -1117,7 +1117,7 @@ class _SpecMethods:
_imp
.
acquire_lock
()
with
_ModuleLockManager
(
name
):
if
sys
.
modules
.
get
(
name
)
is
not
module
:
msg
=
'module {} not in sys.modules'
.
format
(
name
)
msg
=
'module {
!r
} not in sys.modules'
.
format
(
name
)
raise
ImportError
(
msg
,
name
=
name
)
if
self
.
spec
.
loader
is
None
:
if
self
.
spec
.
submodule_search_locations
is
None
:
...
...
@@ -1247,7 +1247,7 @@ class BuiltinImporter:
spec
=
module
.
__spec__
name
=
spec
.
name
if
not
_imp
.
is_builtin
(
name
):
raise
ImportError
(
'{} is not a built-in module'
.
format
(
name
),
raise
ImportError
(
'{
!r
} is not a built-in module'
.
format
(
name
),
name
=
name
)
_call_with_frames_removed
(
_imp
.
init_builtin
,
name
)
# Have to manually initialize attributes since init_builtin() is not
...
...
@@ -1310,7 +1310,7 @@ class FrozenImporter:
def
exec_module
(
module
):
name
=
module
.
__spec__
.
name
if
not
_imp
.
is_frozen
(
name
):
raise
ImportError
(
'{} is not a frozen module'
.
format
(
name
),
raise
ImportError
(
'{
!r
} is not a frozen module'
.
format
(
name
),
name
=
name
)
code
=
_call_with_frames_removed
(
_imp
.
get_frozen_object
,
name
)
exec
(
code
,
module
.
__dict__
)
...
...
@@ -2127,7 +2127,7 @@ def _find_and_load_unlocked(name, import_):
try
:
path
=
parent_module
.
__path__
except
AttributeError
:
msg
=
(
_ERR_MSG
+
'; {} is not a package'
)
.
format
(
name
,
parent
)
msg
=
(
_ERR_MSG
+
'; {
!r
} is not a package'
)
.
format
(
name
,
parent
)
raise
ImportError
(
msg
,
name
=
name
)
spec
=
_find_spec
(
name
,
path
)
if
spec
is
None
:
...
...
Python/importlib.h
Dosyayı görüntüle @
224b2612
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment