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
764d612f
Kaydet (Commit)
764d612f
authored
Eyl 03, 2010
tarafından
Florent Xicluna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove redundant context manager.
üst
43e4ea1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
15 deletions
+1
-15
_bootstrap.py
Lib/importlib/_bootstrap.py
+1
-15
No files found.
Lib/importlib/_bootstrap.py
Dosyayı görüntüle @
764d612f
...
...
@@ -80,20 +80,6 @@ def _path_absolute(path):
return
_path_join
(
_os
.
getcwd
(),
path
)
class
_closing
:
"""Simple replacement for contextlib.closing."""
def
__init__
(
self
,
obj
):
self
.
obj
=
obj
def
__enter__
(
self
):
return
self
.
obj
def
__exit__
(
self
,
*
args
):
self
.
obj
.
close
()
def
_wrap
(
new
,
old
):
"""Simple substitute for functools.wraps."""
for
replace
in
[
'__module__'
,
'__name__'
,
'__doc__'
]:
...
...
@@ -468,7 +454,7 @@ class _FileLoader:
def
get_data
(
self
,
path
):
"""Return the data from path as raw bytes."""
with
_
closing
(
_io
.
FileIO
(
path
,
'r'
)
)
as
file
:
with
_
io
.
FileIO
(
path
,
'r'
)
as
file
:
return
file
.
read
()
...
...
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