# View source code of "Modules"

How do I view the source code of "Modules" (those additional packages/functions that are written by users)?

To explain in detail, for example I want to know how a function .basis() or .rank() works. How do I check out the source code?

Thanks a lot.

edit retag close merge delete

Sort by » oldest newest most voted

To check the source code, use ?? as in

sage: Modules??
Init signature: Modules(self, base, name=None)
Source:
class Modules(Category_module):
r"""
The category of all modules over a base ring R.

An R-module M is a left and right R-module over a
commutative ring R such that:

.. MATH::

r*(x*s) = (r*x)*s \qquad  \forall r,s \in R \text{ and } x \in M

INPUT:

- base_ring -- a ring R or subcategory of Rings()
- dispatch -- a boolean (for internal use; default: True)

When the base ring is a field, the category of vector spaces is
returned instead (unless dispatch == False).

.. WARNING::

more