Maybe this is dumb -- but I'm perpetually bitten by it.  Often times,
I want to factor a list of numbers.  Sometimes, a zero will pop up in
the list, and I get an exception.

Ok, so there isn't a unique prime factorization of zero.  But, there
isn't a unique prime factorization of a negative integer, either, but
we don't raise exceptions there.

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)].

Thoughts?

Of course this is easy to solve:

{{{
    for a,b,c in data:
        print a,b, factor(c)
}}}

just has to be

{{{
    for a,b,c in data:
        if c != 0:
            print a, b, factor(c)
        else:
            print a,b, 0
}}}

but... the second is ugly and there's (IMHO) no reason for it.

   --tom

--~--~---------~--~----~------------~-------~--~----~
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