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
e5fe4af0
Kaydet (Commit)
e5fe4af0
authored
Ara 07, 1995
tarafından
Sjoerd Mullender
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use global statement instead of importing ourselves to get to global
variable.
üst
453ced57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
statcache.py
Lib/statcache.py
+2
-6
No files found.
Lib/statcache.py
Dosyayı görüntüle @
e5fe4af0
...
@@ -22,14 +22,10 @@ def stat(path):
...
@@ -22,14 +22,10 @@ def stat(path):
# Reset the cache completely.
# Reset the cache completely.
# Hack: to reset a global variable, we import this module.
#
#
def
reset
():
def
reset
():
import
statcache
global
cache
# Check that we really imported the same module
cache
=
{}
if
cache
is
not
statcache
.
cache
:
raise
'sorry, statcache identity crisis'
statcache
.
cache
=
{}
# Remove a given item from the cache, if it exists.
# Remove a given item from the cache, if it exists.
...
...
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