Kaydet (Commit) e4deb959 authored tarafından Guido van Rossum's avatar Guido van Rossum

Fix two bugs detected by PyChecker: there's no need for redundant

"import MacOS", and there *is* a need for "import operator".
üst 6386a4c8
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment