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
632a0c14
Kaydet (Commit)
632a0c14
authored
Agu 17, 2010
tarafından
Nick Coghlan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove some lingering remnants of the short-lived functools.lfu_cache
üst
ad1e0c5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
28 deletions
+1
-28
functools.rst
Doc/library/functools.rst
+0
-27
NEWS
Misc/NEWS
+1
-1
No files found.
Doc/library/functools.rst
Dosyayı görüntüle @
632a0c14
...
...
@@ -36,33 +36,6 @@ The :mod:`functools` module defines the following functions:
.. versionadded:: 3.2
.. decorator:: lfu_cache(maxsize)
Decorator to wrap a function with a memoizing callable that saves up to the
*maxsize* most frequent calls. It can save time when an expensive or I/O
bound function is periodically called with the same arguments.
The *maxsize* parameter defaults to 100. Since a dictionary is used to cache
results, the positional and keyword arguments to the function must be
hashable.
The wrapped function is instrumented with two attributes, :attr:`hits`
and :attr:`misses` which count the number of successful or unsuccessful
cache lookups. These statistics are helpful for tuning the *maxsize*
parameter and for measuring the cache's effectiveness.
The wrapped function also has a :attr:`clear` attribute which can be
called (with no arguments) to clear the cache.
A `LFU (least frequently used) cache
<http://en.wikipedia.org/wiki/Cache_algorithms#Least-Frequently_Used>`_
is indicated when the pattern of calls does not change over time, when
more the most common calls already seen are the best predictors of the
most common upcoming calls (for example, a phonelist of popular
help-lines may have access patterns that persist over time).
.. versionadded:: 3.2
.. decorator:: lru_cache(maxsize)
Decorator to wrap a function with a memoizing callable that saves up to the
...
...
Misc/NEWS
Dosyayı görüntüle @
632a0c14
...
...
@@ -200,7 +200,7 @@ Library
- Issue #1286: Allow using fileinput.FileInput as a context manager.
- Add l
fu_cache() and lru_cache() decorators
to the functools module.
- Add l
ru_cache() decorator
to the functools module.
Tools/Demos
-----------
...
...
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