Thank you for your help!

divmod is a built-in python function. It is right to say that the
requirement is to overload that function to include polynomials as well,
correct?

Sandeep


On Fri, Apr 12, 2013 at 5:25 PM, Tom Bachmann <notifications@github.com>wrote:

> In sympy/polys/polytools.py:
>
> > @@ -3669,9 +3669,16 @@ def __pow__(f, n):
> >
> >      @_sympifyit('g', NotImplemented)
> >      def __divmod__(f, g):
> > +        if not f.is_Poly:
>
> On 12.04.2013 12:52, Sandeep Dasika wrote: In sympy/polys/polytools.py: >
> @@ -3669,9 +3669,16 @@ def __pow__(f, n): > > @_sympifyit('g',
> NotImplemented) > def __divmod__(f, g): > + if not f.is_Poly: I was
> checking to see if 'f' is not of type Poly...if not I convert the
> expression into Poly and extract the result. Kindly, let me know if it's a
> wrong approach. Regards Sandeep … <#>
> Well as far as I can tell this is a method of the Poly class, so is_Poly
> will always be set. Did you reproduce the problem from the issue? It seems
> to me that there should be a *toplevel* divmod function which needs to be
> changed. But I don't know for sure.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/sympy/sympy/pull/2005/files#r3770746>
> .
>



-- 
Sandeep Dasika
BITS, Pilani
+91 7829417850