zip() returns a list in Python 2 but an iterator in Python 3.
Fortunately, the only use is in the return statement in pairs() and the
only call site of pairs() iterates over the result. This commit thus
adds a docstrings for pairs to make it clear callers can only rely on
the result being iterable. It also rename the parameter to not conflict
with the list builtin function.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 38344 Build 38343: arc lint + arc unit
Event Timeline
Comment Actions
Cancelling this patch since all users of zip are fine with iterable (pairs is only used in dailyreport.py in a foreach statement).
Comment Actions
LGTM with suggestion to update commit message.
lnt/server/reporting/report.py | ||
---|---|---|
11–12 | I agree that a rename would help. Please update the commit message with the rationale. |
The unpacking works without this change even in Python 3.