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

Unified Diff: mojo/tools/mopy/memoize.py

Issue 878933003: Move the apptest runner and parts of mopy to the public SDK. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/tools/mopy/gtest_list_tests_unittest.py ('k') | mojo/tools/mopy/mojo_python_tests_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/mopy/memoize.py
diff --git a/mojo/tools/mopy/memoize.py b/mojo/tools/mopy/memoize.py
deleted file mode 100644
index 249440b35adcb149b3b685e11a3e097ced6f8cdb..0000000000000000000000000000000000000000
--- a/mojo/tools/mopy/memoize.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-# pylint: disable=C0301
-# Based on/taken from
-# http://code.activestate.com/recipes/578231-probably-the-fastest-memoization-decorator-in-the-/
-# (with cosmetic changes).
-# pylint: enable=C0301
-def memoize(f):
- """Memoization decorator for a function taking a single argument."""
- class Memoize(dict):
- def __missing__(self, key):
- rv = self[key] = f(key)
- return rv
- return Memoize().__getitem__
« no previous file with comments | « mojo/tools/mopy/gtest_list_tests_unittest.py ('k') | mojo/tools/mopy/mojo_python_tests_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698