Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
4de8df92
Kaydet (Commit)
4de8df92
authored
Agu 29, 2001
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add tests for augmented floor division
üst
da8db8ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
test_augassign
Lib/test/output/test_augassign
+3
-0
test_augassign.py
Lib/test/test_augassign.py
+24
-0
No files found.
Lib/test/output/test_augassign
Dosyayı görüntüle @
4de8df92
...
...
@@ -25,6 +25,9 @@ __imul__ called
__div__ called
__rdiv__ called
__idiv__ called
__floordiv__ called
__rfloordiv__ called
__ifloordiv__ called
__mod__ called
__rmod__ called
__imod__ called
...
...
Lib/test/test_augassign.py
Dosyayı görüntüle @
4de8df92
...
...
@@ -6,6 +6,7 @@ x *= 2
x
**=
2
x
-=
8
x
/=
2
x
//=
1
x
%=
12
x
&=
2
x
|=
5
...
...
@@ -19,6 +20,7 @@ x[0] *= 2
x
[
0
]
**=
2
x
[
0
]
-=
8
x
[
0
]
/=
2
x
[
0
]
//=
2
x
[
0
]
%=
12
x
[
0
]
&=
2
x
[
0
]
|=
5
...
...
@@ -32,6 +34,7 @@ x[0] *= 2
x
[
0
]
**=
2
x
[
0
]
-=
8
x
[
0
]
/=
2
x
[
0
]
//=
1
x
[
0
]
%=
12
x
[
0
]
&=
2
x
[
0
]
|=
5
...
...
@@ -128,6 +131,23 @@ class testall:
print
"__idiv__ called"
return
self
def
__floordiv__
(
self
,
val
):
print
"__floordiv__ called"
return
self
def
__ifloordiv__
(
self
,
val
):
print
"__ifloordiv__ called"
return
self
def
__rfloordiv__
(
self
,
val
):
print
"__rfloordiv__ called"
return
self
def
__truediv__
(
self
,
val
):
print
"__truediv__ called"
return
self
def
__itruediv__
(
self
,
val
):
print
"__itruediv__ called"
return
self
def
__mod__
(
self
,
val
):
print
"__mod__ called"
def
__rmod__
(
self
,
val
):
...
...
@@ -201,6 +221,10 @@ x / 1
1
/
x
x
/=
1
x
//
1
1
//
x
x
//=
1
x
%
1
1
%
x
x
%=
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment