On 20-Sep-09, at 10:43 PM, Craig Citro wrote:

>
>>> My preference would be that factor works for all integers.  It's not
>>> like it's hard to factor 0 or anything.  We just return the
>>> factorization object [(0,1)].
>>
>
> I'm pretty indifferent on this, though mildly against -- so -0, I  
> think.

Strong +1 to not throwing an error, though -- I call map(factor, list)  
all the time.

>> I think I would prfer the empty list of primes and a "unit" of 0:
>>
>
> If we're going to add it, I'm strongly on the other side of the fence:
> I'd much prefer 0 show up in the list of primes, and not as the unit.
> After all, 0 is a prime (in any domain, which is probably the case if
> we're asking to factor), but it's only a unit in the zero ring -- and
> we're unlikely to be factoring there. :) Seriously, though, if one of
> the return values of a function is called "unit," I'd be really
> annoyed if dividing by it raised a ZeroDivisionError.

I agree with this reasoning -- the unit part should really be a unit :)

Nick

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to