ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 08 Jul 2018 10:29:37 -0500View source code of "Modules"http://ask.sagemath.org/question/42860/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.
Sun, 08 Jul 2018 08:33:49 -0500http://ask.sagemath.org/question/42860/view-source-code-of-modules/Answer by vdelecroix for <p>How do I view the source code of "Modules" (those additional packages/functions that are written by users)?</p>
<p>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?</p>
<p>Thanks a lot.</p>
http://ask.sagemath.org/question/42860/view-source-code-of-modules/?answer=42861#post-id-42861To 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::Sun, 08 Jul 2018 10:29:37 -0500http://ask.sagemath.org/question/42860/view-source-code-of-modules/?answer=42861#post-id-42861