Just curious if there is a way in Python to compare two objects that are functionally equal, but expressed differently. For example, these two regular expression objects mean the same thing (both would match "5.5" or "5.55" or "5.5555"), but "a" is verbose.
a = regex.compile(r"""\d + # the integral part
\. # the decimal point
\d * # some fractional digits""", regex.X)
b = regex.compile(r"\d+\.\d*")
Printing a == b evaluates to False.