Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: client/utils/lru.py

Issue 1860863002: Update copyright notice from Swarming to LUCI; add AUTHORS and CONTRIBUTORS. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: . Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « client/utils/logging_utils.py ('k') | client/utils/net.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Swarming Authors. All rights reserved. 1 # Copyright 2013 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 that 2 # Use of this source code is governed by the Apache v2.0 license that can be
3 # can be found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Defines a dictionary that can evict least recently used items.""" 5 """Defines a dictionary that can evict least recently used items."""
6 6
7 import collections 7 import collections
8 import json 8 import json
9 9
10 10
11 class LRUDict(object): 11 class LRUDict(object):
12 """Dictionary that can evict least recently used items. 12 """Dictionary that can evict least recently used items.
13 13
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 Raises KeyError if dict is empty. 137 Raises KeyError if dict is empty.
138 """ 138 """
139 pair = self._items.popitem(last=False) 139 pair = self._items.popitem(last=False)
140 self._dirty = True 140 self._dirty = True
141 return pair 141 return pair
142 142
143 def itervalues(self): 143 def itervalues(self):
144 """Iterator over stored values in arbitrary order.""" 144 """Iterator over stored values in arbitrary order."""
145 return self._items.itervalues() 145 return self._items.itervalues()
OLDNEW
« no previous file with comments | « client/utils/logging_utils.py ('k') | client/utils/net.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698