Преглед на файлове

Add missing colons to class methods (#143)

cclauss преди 7 години
родител
ревизия
0178943013
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      solutions/object_oriented_design/lru_cache/lru_cache.py
  2. 1 1
      solutions/system_design/query_cache/query_cache_snippets.py

+ 1 - 1
solutions/object_oriented_design/lru_cache/lru_cache.py

@@ -29,7 +29,7 @@ class Cache(object):
         self.lookup = {}  # key: query, value: node
         self.linked_list = LinkedList()
 
-    def get(self, query)
+    def get(self, query):
         """Get the stored query result from the cache.
 
         Accessing a node updates its position to the front of the LRU list.

+ 1 - 1
solutions/system_design/query_cache/query_cache_snippets.py

@@ -52,7 +52,7 @@ class Cache(object):
         self.lookup = {}
         self.linked_list = LinkedList()
 
-    def get(self, query)
+    def get(self, query):
         """Get the stored query result from the cache.
 
         Accessing a node updates its position to the front of the LRU list.