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.Mon, 07 Jul 2014 04:22:36 -0500the same function appears twice in the documentationhttp://ask.sagemath.org/question/11056/the-same-function-appears-twice-in-the-documentation/The functions base_field()/constant_base_field()/constant_field()/vector_space()/maximal_order()/random_element appear twice in the following document:
http://sagemath.org/doc/reference/function_fields/sage/rings/function_field/function_field.html
and what different with RationalFunctionField() and FunctionField()?Wed, 19 Feb 2014 17:16:02 -0600http://ask.sagemath.org/question/11056/the-same-function-appears-twice-in-the-documentation/Answer by vdelecroix for <p>The functions base_field()/constant_base_field()/constant_field()/vector_space()/maximal_order()/random_element appear twice in the following document:</p>
<p><a href="http://sagemath.org/doc/reference/function_fields/sage/rings/function_field/function_field.html">http://sagemath.org/doc/reference/fun...</a></p>
<p>and what different with RationalFunctionField() and FunctionField()?</p>
http://ask.sagemath.org/question/11056/the-same-function-appears-twice-in-the-documentation/?answer=23111#post-id-23111Hi,
Python is object oriented (see [Python doc about classes](https://docs.python.org/2/tutorial/classes.html)) and what you call *functions* are actually *methods*, i.e. they belong to their class. The point is that you can have different implementation of the objects and keep the same interface. In this particular case, given any function field you will use
sage: K.base_field()
to get the base field.
For the existence of the two classes, it is explicitly said in the documentation:
- **FunctionField**: The abstract base class for all function fields.
- **RationalFunctionField**: A rational function field K(t) in one variable, over an arbitrary base field.
VincentSun, 29 Jun 2014 06:49:01 -0500http://ask.sagemath.org/question/11056/the-same-function-appears-twice-in-the-documentation/?answer=23111#post-id-23111Comment by cjsh for <p>Hi,</p>
<p>Python is object oriented (see <a href="https://docs.python.org/2/tutorial/classes.html">Python doc about classes</a>) and what you call <em>functions</em> are actually <em>methods</em>, i.e. they belong to their class. The point is that you can have different implementation of the objects and keep the same interface. In this particular case, given any function field you will use </p>
<pre><code>sage: K.base_field()
</code></pre>
<p>to get the base field.</p>
<p>For the existence of the two classes, it is explicitly said in the documentation:</p>
<ul>
<li><strong>FunctionField</strong>: The abstract base class for all function fields.</li>
<li><strong>RationalFunctionField</strong>: A rational function field K(t) in one variable, over an arbitrary base field.</li>
</ul>
<p>Vincent</p>
http://ask.sagemath.org/question/11056/the-same-function-appears-twice-in-the-documentation/?comment=23247#post-id-23247thank you very much! Mon, 07 Jul 2014 04:22:36 -0500http://ask.sagemath.org/question/11056/the-same-function-appears-twice-in-the-documentation/?comment=23247#post-id-23247