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
5e5bbfb6
Kaydet (Commit)
5e5bbfb6
authored
Eki 31, 2012
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge heads
üst
e132f527
091bf532
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
decimal.rst
Doc/library/decimal.rst
+15
-6
profile.rst
Doc/library/profile.rst
+0
-0
test_bisect.py
Lib/test/test_bisect.py
+1
-1
No files found.
Doc/library/decimal.rst
Dosyayı görüntüle @
5e5bbfb6
...
...
@@ -750,12 +750,21 @@ Decimal objects
.. method:: remainder_near(other[, context])
Compute the modulo as either a positive or negative value depending on
which is closest to zero. For instance, ``Decimal(10).remainder_near(6)``
returns ``Decimal('-2')`` which is closer to zero than ``Decimal('4')``.
If both are equally close, the one chosen will have the same sign as
*self*.
Return the remainder from dividing *self* by *other*. This differs from
``self % other`` in that the sign of the remainder is chosen so as to
minimize its absolute value. More precisely, the return value is
``self - n * other`` where ``n`` is the integer nearest to the exact
value of ``self / other``, and if two integers are equally near then the
even one is chosen.
If the result is zero then its sign will be the sign of *self*.
>>> Decimal(18).remainder_near(Decimal(10))
Decimal('-2')
>>> Decimal(25).remainder_near(Decimal(10))
Decimal('5')
>>> Decimal(35).remainder_near(Decimal(10))
Decimal('-5')
.. method:: rotate(other[, context])
...
...
Doc/library/profile.rst
Dosyayı görüntüle @
5e5bbfb6
This diff is collapsed.
Click to expand it.
Lib/test/test_bisect.py
Dosyayı görüntüle @
5e5bbfb6
...
...
@@ -239,7 +239,7 @@ class TestInsort(unittest.TestCase):
else
:
f
=
self
.
module
.
insort_right
f
(
insorted
,
digit
)
self
.
assertEqual
(
sorted
(
insorted
),
insorted
)
self
.
assertEqual
(
sorted
(
insorted
),
insorted
)
def
test_backcompatibility
(
self
):
self
.
assertEqual
(
self
.
module
.
insort
,
self
.
module
.
insort_right
)
...
...
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