소스 검색

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.