Skip to content

Commit

Permalink
sagemathgh-38092: doc: Update help() outputs
Browse files Browse the repository at this point in the history
### 📝 Checklist

- [x] The title is concise and informative.
- [x] I have updated the documentation and checked the documentation
preview.

URL: sagemath#38092
Reported by: gmou3
Reviewer(s): Matthias Köppe
  • Loading branch information
Release Manager committed May 27, 2024
2 parents 3737662 + 040d2f5 commit 36da270
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 117 deletions.
4 changes: 2 additions & 2 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tarball=configure-VERSION.tar.gz
sha1=471d1f0b2d196f53d0f2642f23dec8e306d19e9d
sha256=f5e990564bfce379ec01675351e47d1be2aff8a2f9433c8dcdb722257ff314ad
sha1=8164bb387998beb2257d3e09f10697195e958860
sha256=981eb6316a4ff9179b0eb7242e23f4cb39e00372d2aa855efde6885e599e26e8
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7e761162d6ebd9c81d5feb1007530bcdd408dadc
fb2b8c823bcc3f168c1e6e467f254557fa714db9
28 changes: 19 additions & 9 deletions src/doc/de/tutorial/interactive_shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -621,15 +621,25 @@ um eine manpage-artige Hilfe zu bekommen.
::

sage: help(VectorSpace)
Help on class VectorSpace ...

class VectorSpace(__builtin__.object)
| Create a Vector Space.
|
| To create an ambient space over a field with given dimension
| using the calling syntax ...
:
:
Help on function VectorSpace in module sage.modules.free_module:

VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *,
with_basis='standard', dimension=None, basis_keys=None, **args)
EXAMPLES:

The base can be complicated, as long as it is a field.

::

sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3)
sage: V
Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x
over Integer Ring
sage: V.basis()
[
(1, 0, 0),
(0, 1, 0),
--More--

Wenn Sie ``q`` drücken um das Hilfesystem zu verlassen, kommen Sie genau
dahin zurück, wo Sie Ihre Sitzung verlassen haben. Die ``help`` Anzeige
Expand Down
45 changes: 17 additions & 28 deletions src/doc/en/constructions/interface_issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,34 +132,23 @@ returns
.. CODE-BLOCK:: text
Help on function Matrix in module sage.matrix.constructor:
Matrix(R, nrows, ncols, entries = 0, sparse = False)
Create a matrix.
INPUT:
R -- ring
nrows -- int; number of rows
ncols -- int; number of columns
entries -- list; entries of the matrix
sparse -- bool (default: False); whether or not to store matrices as sparse
OUTPUT:
a matrix
EXAMPLES:
sage: Matrix(RationalField(), 2, 2, [1,2,3,4])
[1 2]
[3 4]
sage: Matrix(FiniteField(5), 2, 3, range(6))
[0 1 2]
[3 4 0]
sage: Matrix(IntegerRing(), 10, 10, range(100)).parent()
Full MatrixSpace of 10 by 10 dense matrices over Integer Ring
sage: Matrix(IntegerRing(), 10, 10, range(100), sparse = True).parent()
Full MatrixSpace of 10 by 10 sparse matrices over Integer Ring
Help on cython_function_or_method in module sage.matrix.constructor:
matrix(*args, **kwds)
matrix(*args, **kwds)
File: sage/matrix/constructor.pyx (starting at line 21)
Create a matrix.
This implements the ``matrix`` constructor::
sage: matrix([[1,2],[3,4]])
[1 2]
[3 4]
It also contains methods to create special types of matrices, see
``matrix.[tab]`` for more options. For example::
--More--
in a new screen. Type q to return to the Sage screen.

Expand Down
28 changes: 19 additions & 9 deletions src/doc/en/tutorial/interactive_shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -669,15 +669,25 @@ manpage-like help file about a given class.
::

sage: help(VectorSpace)
Help on class VectorSpace ...

class VectorSpace(__builtin__.object)
| Create a Vector Space.
|
| To create an ambient space over a field with given dimension
| using the calling syntax ...
:
:
Help on function VectorSpace in module sage.modules.free_module:

VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *,
with_basis='standard', dimension=None, basis_keys=None, **args)
EXAMPLES:

The base can be complicated, as long as it is a field.

::

sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3)
sage: V
Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x
over Integer Ring
sage: V.basis()
[
(1, 0, 0),
(0, 1, 0),
--More--

When you type ``q`` to exit the help system, your session appears
just as it was. The help listing does not clutter up your session,
Expand Down
30 changes: 20 additions & 10 deletions src/doc/fr/tutorial/interactive_shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ magiques » :
exemple ``.profile``). La commande ``%edit`` à l'invite de Sage ouvrira
l'éditeur sélectionné. Vous pouvez alors par exemple saisir une définition de
fonction::

def some_function(n):
return n**2 + 3*n + 2

Expand Down Expand Up @@ -679,15 +679,25 @@ classe.
::

sage: help(VectorSpace)
Help on class VectorSpace ...

class VectorSpace(__builtin__.object)
| Create a Vector Space.
|
| To create an ambient space over a field with given dimension
| using the calling syntax ...
:
:
Help on function VectorSpace in module sage.modules.free_module:

VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *,
with_basis='standard', dimension=None, basis_keys=None, **args)
EXAMPLES:

The base can be complicated, as long as it is a field.

::

sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3)
sage: V
Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x
over Integer Ring
sage: V.basis()
[
(1, 0, 0),
(0, 1, 0),
--More--

Pour quitter la page d'aide, appuyez sur ``q``. Votre session revient à
l'écran comme elle était : contrairement à la sortie de ``fonction?``,
Expand Down
38 changes: 24 additions & 14 deletions src/doc/ja/tutorial/interactive_shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ IPythonについてもっと知りたければ、Sageプロンプトで ``?``

Sageセッションのロギングと,セッションの保存(:ref:`section-save` 節を参照)は同じことではない.
入力のログをとるには, ``logstart`` コマンドを使う(オプションで出力のログも可能だ).
詳細については ``logstart?`` と入力してみてほしい.
詳細については ``logstart?`` と入力してみてほしい.
``logstart`` を使えば,全ての入力と出力のログを残し,将来のセッション時に(そのログファイルをリロードしてやるだけで)入力を再生することも可能になる.

.. skip
Expand Down Expand Up @@ -379,11 +379,11 @@ IPythonトリック


IPythonのクイック レファレンスガイドを見たければ, ``%quickref`` と入力する.
執筆時点(2011年4月)ではSageはIPythonのバージョン0.9.1を採用しており, `documentation for its magic commands
執筆時点(2011年4月)ではSageはIPythonのバージョン0.9.1を採用しており, `documentation for its magic commands
<http://ipython.org/ipython-doc/dev/interactive/tutorial.html#magic-functions>`_
はオンラインで読むことができる.
マジックコマンドの,ちょっと進んだ機能群についてはIPythonの `ここ
<http://ipython.org/ipython-doc/stable/interactive/reference.html#magic-command-system>`_
<http://ipython.org/ipython-doc/stable/interactive/reference.html#magic-command-system>`_
で文書化されているのが見つかるはずだ.


Expand Down Expand Up @@ -452,7 +452,7 @@ Sageに戻るには,Ctrl-Dか ``quit`` を入力する.
=================================

*遡行検索*: コマンドの冒頭部を打ち込んでから ``Ctrl-p`` (または上向き矢印キー)を押すと,冒頭部が一致する過去の入力行を全て呼び出すことができる.
この機能は,Sageをいったん終了し再起動してからでも有効である.
この機能は,Sageをいったん終了し再起動してからでも有効である.
``Ctrl-r`` を入力すれば,入力ヒストリを逆方向に検索することも可能だ.
この入力行の検索と再利用機能は全て ``readline`` パッケージを経由しており,ほとんどのLinux系システム上で利用できるはずだ.

Expand Down Expand Up @@ -610,15 +610,25 @@ Sageの特長の一つは,総合的なヘルプ機能の装備である.
::

sage: help(VectorSpace)
Help on class VectorSpace ...
Help on function VectorSpace in module sage.modules.free_module:

class VectorSpace(__builtin__.object)
| Create a Vector Space.
|
| To create an ambient space over a field with given dimension
| using the calling syntax ...
:
:
VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *,
with_basis='standard', dimension=None, basis_keys=None, **args)
EXAMPLES:

The base can be complicated, as long as it is a field.

::

sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3)
sage: V
Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x
over Integer Ring
sage: V.basis()
[
(1, 0, 0),
(0, 1, 0),
--More--


``q`` と入力してヘルプを終えると,中断前のセッション画面がそのまま復帰する.
Expand Down Expand Up @@ -647,10 +657,10 @@ Sageの特長の一つは,総合的なヘルプ機能の装備である.
..
#. **Save your Game:** Only support saving and loading of complete
sessions (e.g., GAP, Magma).
#. **Unified Input/Output:** Make every object print in a way that
can be read back in (GP/PARI).

#. **Eval**: Make it easy to evaluate arbitrary code in the
interpreter (e.g., Singular, PARI).

Expand Down
Loading

0 comments on commit 36da270

Please sign in to comment.