On Sep 13, 4:28 pm, Rolandb <[email protected]> wrote:
> Hi,
>
> factor(1)
> 1
> list(factor(1))
> []

Well, considered as an integer, this is giving the prime (power)
decomposition of 1.  And there are no such primes, so the list is
empty.

I suppose the problem you're encountering is that what is returned
isn't a number, but a Factorization object.  This isn't clear until
you ask about it.

sage: a = factor(1)
sage: type(a)
<class 'sage.structure.factorization_integer.IntegerFactorization'>

In this case, it makes sense that there isn't a list.  Plus, it's not
clear what power should be assigned to 1!  As opposed to with

sage: list(factor(10))
[(2, 1), (5, 1)]

Given this format, it is best to keep things as they are, (not to
mention there is probably code that relies on this behavior...) or we
would have to give up unique factorization.

On an unrelated note, I saw you use

> Sage 4.7, Windows 7

Nice!  If you are interested in helping us port Sage (more) natively
to Windows, let us know - there are fairly easy things you can do to
test that require no programming.

- kcrisman

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to