diff --git a/src/sage/rings/polynomial/integer_valued_polynomials.py b/src/sage/rings/polynomial/integer_valued_polynomials.py index 3df5a101dbc..41975882cc2 100644 --- a/src/sage/rings/polynomial/integer_valued_polynomials.py +++ b/src/sage/rings/polynomial/integer_valued_polynomials.py @@ -224,10 +224,15 @@ def from_polynomial(self, p): Traceback (most recent call last): ... ValueError: not a polynomial with integer values: 1/3 + + sage: t = polygen(ZZ,'t') + sage: B = IntegerValuedPolynomialRing(QQ).B() + sage: B.from_polynomial(t+1) + B[0] + B[1] """ B = self.basis() poly = self._poly - remain = p + remain = p.change_variable_name('x') result = self.zero() while remain: N = remain.degree()