Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

factor?? or factor.__doc__, is this the answer to the question?!

To make the answer longer, here are the first few lines of the doc string:

sage: print '\n'.join(factor.__doc__.split('\n')[:20])

Returns the factorization of ``n``.  The result depends on the
type of ``n``.

If ``n`` is an integer, returns the factorization as an object
of type ``Factorization``.

If n is not an integer, ``n.factor(proof=proof, **kwds)`` gets called.
See ``n.factor??`` for more documentation in this case.

.. warning::

   This means that applying ``factor`` to an integer result of
   a symbolic computation will not factor the integer, because it is
   considered as an element of a larger symbolic ring.

   EXAMPLES::

       sage: f(n)=n^2
       sage: is_prime(f(3))
sage: