فهرست منبع

rephrase docstring and remove unused sentinel

Eric Wolf 2 سال پیش
والد
کامیت
ad3c890167
1فایلهای تغییر یافته به همراه3 افزوده شده و 4 حذف شده
  1. 3 4
      src/borg/helpers/lrucache.py

+ 3 - 4
src/borg/helpers/lrucache.py

@@ -2,16 +2,15 @@ from collections import OrderedDict
 from collections.abc import Callable, ItemsView, Iterator, KeysView, MutableMapping, ValuesView
 from typing import TypeVar
 
-sentinel = object()
 K = TypeVar("K")
 V = TypeVar("V")
 
 
 class LRUCache(MutableMapping[K, V]):
     """
-    Mapping which maintains a maximum size by dropping the least recently used value.
-    Items are passed to dispose before being removed and replacing an item without
-    removing it first is forbidden.
+    Mapping which maintains a maximum size by removing the least recently used value.
+    Items are passed to dispose before being removed and setting an item which is
+    already in the cache has to be done using the replace method.
     """
 
     _cache: OrderedDict[K, V]