STY: usage of itertools #1018
Labels
good first issue
style
An issue or question about the best way of doing things. For example, does this follow PEP-8?
Milestone
Is your feature request related to a problem? Please describe.
There are areas of the code where we have a bunch of nested
for
loops. This limits the usable space deep in the loop (80-char).Describe the solution you'd like
Use
itertools.product
to combine the loops. This is part of the core python package. Functionally, it still works as nestedfor
loops, but the ease of reading is improved.Describe alternatives you've considered
Leave things as they are.
Additional context
Example:
pysat/pysat/instruments/methods/testing.py
Lines 634 to 636 in 6389d9d
The text was updated successfully, but these errors were encountered: