smichr/sympy — comment on commit 649fa46a218f4422b6f8ea87202b0e6fae976d7c
File: sympy/core/mul.py line 1289
By smichr:

It now appears as:

```python

def primitive(self):
"""Return ``(R, self/R)`` where ``R`` is the product of the Rational
primitives that can be extracted from self's arguments while retaining
self's structure.

Example:

>>> from sympy.abc import x
>>> ((3+3*x)*(2+2*x)*(1+x)**2).primitive()
(6, (x + 1)**4)
"""

coef = S.One
args = []
for i, a in enumerate(self.args):
c, p = a.primitive()
coef *= c
if p is not S.One:
args.append(p)
# don't use self._from_args here to reconstruct args
# since there may be identical args now that should be combined
# e.g. (2+2*x)*(3+3*x) should be (6, (1 + x)**2) not (6, (1+x)*(1+x))
return coef, Mul(*args)

```