I’ll have to break my last promise and post again - reading this post I now see the risk in defining __match_args__
in my Fraction
subclass. It’s because a (numerator, denominator)
combination is not enough to uniquely identify a fraction because of the reduction to a coprime pair. Although it depends on the form of the match
-case
statement - it can be done sensibly.