[sage-devel] Re: factoring rational functions -- inconsistent error messages!

2010-01-07 Thread Sebastian Pancratz
Jason, you beat me to it. Thank you for letting me know, though! Sebastian On Jan 7, 5:01 pm, Jason Grout wrote: > Sebastian Pancratz wrote: > > Further to my earlier post, a search for "def factor(self," in the > > Sage library reveals that there are a lot of instances where the > > factoring

[sage-devel] Re: factoring rational functions -- inconsistent error messages!

2010-01-07 Thread Sebastian Pancratz
In fact, this is not quite what I wanted. I should have written def factor(self, *args, **kwds) return self.numerator().factor(*args, **kwds) / \ self.denominator().factor(*args, **kwds) In the meantime, while waiting for further comments, I've put this up as ticket #7868. I'll test

Re: [sage-devel] Re: factoring rational functions -- inconsistent error messages!

2010-01-07 Thread John Cremona
2010/1/7 Jason Grout : > I haven't read this thread very carefully, but just from a python > perspective, you probably want something like the following to pass on all > of the arguments. > > def factor(self, *args, **kwds) >     return self.numerator().factor(*args,**kwds)/self.denominator().fact

[sage-devel] Re: factoring rational functions -- inconsistent error messages!

2010-01-07 Thread Jason Grout
Sebastian Pancratz wrote: Further to my earlier post, a search for "def factor(self," in the Sage library reveals that there are a lot of instances where the factoring method supports various arguments. Thus, at the very least, I think the fraction field implementation should allow further argum

Re: [sage-devel] Re: factoring rational functions -- inconsistent error messages!

2010-01-07 Thread John Cremona
2010/1/7 Sebastian Pancratz : > Further to my earlier post, a search for "def factor(self," in the > Sage library reveals that there are a lot of instances where the > factoring method supports various arguments.  Thus, at the very least, > I think the fraction field implementation should allow fur

[sage-devel] Re: factoring rational functions -- inconsistent error messages!

2010-01-07 Thread Sebastian Pancratz
Further to my earlier post, a search for "def factor(self," in the Sage library reveals that there are a lot of instances where the factoring method supports various arguments. Thus, at the very least, I think the fraction field implementation should allow further arguments, too, and simply forwar

[sage-devel] Re: factoring rational functions -- inconsistent error messages!

2010-01-07 Thread Sebastian Pancratz
Dear John, I haven't written any of the code involved, so I am not absolutely sure about this, but after looking at the code for a few minutes, I think the following is the case: The "FractionFieldElement" objects have a method "factor", but this takes no arguments other than "self". This explai