Closed Philippe-Cholet closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
1f69c53
) 94.20% compared to head (5ab11d6
) 94.08%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I just added some simple tests.
my gut feeling is that the Macro has a bit many branches, but I think we can clean that up later if we want to
It would have even more branches if we ever do #264
(Similarly, for izip
, there is #267.)
(T,)
is a somewhat exotic type
Indeed. But iproduct!( just_one_iterator )
is weird too. In practice people won't write such code by hand very often. Even when they do (eg when messing about trying to decide between code patterns, or commenting bits out, or something) providing the unary tuple will probably be more convenient as it'll involve less editing of the code that handles the output elements.
Given this, I'm okay with approving this PR.
Thanks.
Fixes #868 Allow trailing commas is convenient when the macro is on multiple lines.
Fixes #869 It is more consistent to return tuples in every case. It however is a breaking change. Note the new case: the empty product generating a single unit tuple
()
, similar to the recent #835.What do you think? EDIT: 2nd option, we can fix the first one and close the second.
PS: I note that semver-checks does not see much breaking changes lately.