summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-08-09 21:22:15 (GMT)
committerGuido van Rossum <guido@python.org>2001-08-09 21:22:15 (GMT)
commite4deb959cce4b35c17a48c7a7ec3cfb7bf860edf (patch)
tree7ebff1f1376ddfc53d7345f3ef8c3faf48c121f0
parent6386a4c846e70230fa4a3b171c25d5557e5d0c2c (diff)
downloadcpython-e4deb959cce4b35c17a48c7a7ec3cfb7bf860edf.zip
cpython-e4deb959cce4b35c17a48c7a7ec3cfb7bf860edf.tar.gz
cpython-e4deb959cce4b35c17a48c7a7ec3cfb7bf860edf.tar.bz2
Fix two bugs detected by PyChecker: there's no need for redundant
"import MacOS", and there *is* a need for "import operator".
-rwxr-xr-xLib/profile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/profile.py b/Lib/profile.py
index 5df1025..b92bd91 100755
--- a/Lib/profile.py
+++ b/Lib/profile.py
@@ -145,7 +145,6 @@ class Profile:
if not timer:
if os.name == 'mac':
- import MacOS
self.timer = MacOS.GetTicks
self.dispatcher = self.trace_dispatch_mac
self.get_time = _get_time_mac
@@ -177,6 +176,7 @@ class Profile:
# list (for performance). Note that we can't assume
# the timer() result contains two values in all
# cases.
+ import operator
def get_time_timer(timer=timer,
reduce=reduce, reducer=operator.add):
return reduce(reducer, timer(), 0)