Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit da78958

Browse files
author
Frédéric Chapoton
committed
using optional python2 where appropriate
1 parent a67ca68 commit da78958

File tree

8 files changed

+15
-16
lines changed

8 files changed

+15
-16
lines changed

src/doc/de/tutorial/afterword.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ sein, also verhält sich Sage an manchen Stellen anders als Python.
101101
'3^2'
102102

103103
- **Integerdivision:** Der Pythonaudruck ``2/3`` verhält sich nicht
104-
so, wie es Mathematiker erwarten würden. In Python wird, falls ``m`` und
104+
so, wie es Mathematiker erwarten würden. In Python 2 wird, falls ``m`` und
105105
``n`` Integer sind, auch ``m/n`` als Integer behandelt, es ist
106106
nämlich der Quotient von ``m`` geteilt durch ``n``. Daher ist
107107
``2/3=0``. Es wurde in der Pythoncommunity darüber geredet, ob in
@@ -121,7 +121,7 @@ sein, also verhält sich Sage an manchen Stellen anders als Python.
121121
Rational Field
122122
sage: 2//3
123123
0
124-
sage: int(2)/int(3) # not tested, python2 only
124+
sage: int(2)/int(3) # optional - python2
125125
0
126126

127127
- **Große ganze Zahlen:** Python besitzt von Hause aus Unterstützung

src/doc/en/tutorial/programming.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ the Python int ``1`` is unique, but the Sage Integer ``1`` is not:
684684

685685
sage: 1 is 2/2
686686
False
687-
sage: int(1) is int(2)/int(2) # not tested, python2 only
687+
sage: int(1) is int(2)/int(2) # optional - python2
688688
True
689689
sage: 1 is 1
690690
False

src/doc/fr/tutorial/afterword.rst

+5-6
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,11 @@ Aussi, Sage se comporte différemment de Python à plusieurs égards.
113113
10
114114

115115
- **Division entière :** L'expression Python ``2/3`` ne se comporte pas
116-
de la manière à laquelle s'attendraient des mathématiciens. En Python, si
116+
de la manière à laquelle s'attendraient des mathématiciens. En Python 2, si
117117
``m`` et ``n`` sont de type int, alors ``m/n`` est aussi de type int, c'est
118-
le quotient entier de ``m`` par ``n``. Par conséquent, ``2/3=0``. Il
119-
y a eu dans la communauté Python des débats sur une éventuelle
120-
modification du langage de sorte que ``2/3`` renvoie un flottant
121-
``0.6666...`` et que ce soit ``2//3`` qui renvoie ``0``.
118+
le quotient entier de ``m`` par ``n``. Par conséquent, ``2/3=0``. Ce
119+
comportement est différent en Python 3, où ``2/3`` renvoie un flottant
120+
``0.6666...`` et c'est ``2//3`` qui renvoie ``0``.
122121

123122
Dans l'interpréteur Sage, nous réglons cela en encapsulant
124123
automatiquement les entiers litéraux par ``Integer( )`` et en faisant
@@ -133,7 +132,7 @@ Aussi, Sage se comporte différemment de Python à plusieurs égards.
133132
Rational Field
134133
sage: 2//3
135134
0
136-
sage: int(2)/int(3) # not tested, python2 only
135+
sage: int(2)/int(3) # optional - python2
137136
0
138137

139138
- **Entiers longs :** Python possède nativement un support pour les entiers de

src/doc/ja/tutorial/afterword.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Pythonの数学機能には混乱を招きがちな面があり,SageにはPyth
9696
Rational Field
9797
sage: 2//3
9898
0
99-
sage: int(2)/int(3) # not tested, python2 only
99+
sage: int(2)/int(3) # optional - python2
100100
0
101101

102102
- **長整数:** Python本体は,C言語由来のint型だけではなく任意精度整数をサポートしている.

src/doc/ja/tutorial/programming.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ Sageにおける異種オブジェクト間の比較演算では,まず対象
661661

662662
sage: 1 is 2/2
663663
False
664-
sage: int(1) is int(2)/int(2) # not tested, python2 only
664+
sage: int(1) is int(2)/int(2) # optional - python2
665665
True
666666
sage: 1 is 1
667667
False

src/doc/pt/tutorial/afterword.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ se comporta diferentemente do Python em diversas situações.
9494
'3^2'
9595

9696
- **Divisão por inteiros:** A expressão em Python ``2/3`` não se
97-
comporta da forma que um matemático esperaria. Em Python, se ``m``
97+
comporta da forma que um matemático esperaria. Em Python 2, se ``m``
9898
e ``n`` são inteiros (int), então ``m/n`` também é um inteiro
9999
(int), a saber, o quociente de ``m`` dividido por ``n``. Portanto
100100
``2/3=0``. Tem havido discussões na comunidade do Python para
@@ -113,7 +113,7 @@ se comporta diferentemente do Python em diversas situações.
113113
Rational Field
114114
sage: 2//3
115115
0
116-
sage: int(2)/int(3) # not tested, python2 only
116+
sage: int(2)/int(3) # optional - python2
117117
0
118118

119119
- **Inteiros longos:** O Python possui suporte nativo para inteiros

src/doc/pt/tutorial/programming.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ o int ``1`` do Python é único, mas o Inteiro ``1`` do Sage não é.
705705

706706
sage: 1 is 2/2
707707
False
708-
sage: int(1) is int(2)/int(2) # not tested, python2 only
708+
sage: int(1) is int(2)/int(2) # optional - python2
709709
True
710710
sage: 1 is 1
711711
False

src/doc/ru/tutorial/afterword.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Sage ведет себя немного другим образом.
8989
'3^2'
9090

9191
- **Деление целых чисел:** Выражение ``2/3`` в Python означает не то, чего
92-
ожидает математик. В Python, если ``m`` и ``n`` - целые числа, то ``m/n``
92+
ожидает математик. В Python 2, если ``m`` и ``n`` - целые числа, то ``m/n``
9393
также целое число, если быть точнее, то целая часть от деления ``m`` на
9494
``n``. Следовательно ``2/3=0``. В сообществе Python обсуждается вариант
9595
изменения оператора так, чтобы ``2/3`` возвращало число с плавающей точкой
@@ -106,7 +106,7 @@ Sage ведет себя немного другим образом.
106106
Rational Field
107107
sage: 2//3
108108
0
109-
sage: int(2)/int(3) # not tested, python2 only
109+
sage: int(2)/int(3) # optional - python2
110110
0
111111

112112
- **Большие целые числа:** Python имеет встроенную поддержку целых чисел

0 commit comments

Comments
 (0)