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

"import MacOS", and there *is* a need for "import operator".
This commit is contained in:
Guido van Rossum 2001-08-09 21:22:15 +00:00
parent 6386a4c846
commit e4deb959cc

View file

@ -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)