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
5eaffc4c
Kaydet (Commit)
5eaffc4c
authored
Nis 17, 2008
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue 2648: Add leading zero to money format recipe in the docs.
üst
967a83c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
decimal.rst
Doc/library/decimal.rst
+3
-1
itertools.rst
Doc/library/itertools.rst
+5
-9
No files found.
Doc/library/decimal.rst
Dosyayı görüntüle @
5eaffc4c
...
@@ -1426,7 +1426,7 @@ to work with the :class:`Decimal` class::
...
@@ -1426,7 +1426,7 @@ to work with the :class:`Decimal` class::
>>> moneyfmt(Decimal(123456789), sep=' ')
>>> moneyfmt(Decimal(123456789), sep=' ')
'123 456 789.00'
'123 456 789.00'
>>> moneyfmt(Decimal('-0.02'), neg='<', trailneg='>')
>>> moneyfmt(Decimal('-0.02'), neg='<', trailneg='>')
'<.02>'
'<
0
.02>'
"""
"""
q = Decimal(10) ** -places # 2 places --> '0.01'
q = Decimal(10) ** -places # 2 places --> '0.01'
...
@@ -1439,6 +1439,8 @@ to work with the :class:`Decimal` class::
...
@@ -1439,6 +1439,8 @@ to work with the :class:`Decimal` class::
for i in range(places):
for i in range(places):
build(next() if digits else '0')
build(next() if digits else '0')
build(dp)
build(dp)
if not digits:
build('0')
i = 0
i = 0
while digits:
while digits:
build(next())
build(next())
...
...
Doc/library/itertools.rst
Dosyayı görüntüle @
5eaffc4c
...
@@ -98,7 +98,7 @@ loops that truncate the stream.
...
@@ -98,7 +98,7 @@ loops that truncate the stream.
.. function:: combinations(iterable, r)
.. function:: combinations(iterable, r)
Return
successive *r* length combinations of elements in the
*iterable*.
Return
*r* length subsequences of elements from the input
*iterable*.
Combinations are emitted in lexicographic sort order. So, if the
Combinations are emitted in lexicographic sort order. So, if the
input *iterable* is sorted, the combination tuples will be produced
input *iterable* is sorted, the combination tuples will be produced
...
@@ -108,9 +108,6 @@ loops that truncate the stream.
...
@@ -108,9 +108,6 @@ loops that truncate the stream.
value. So if the input elements are unique, there will be no repeat
value. So if the input elements are unique, there will be no repeat
values in each combination.
values in each combination.
Each result tuple is ordered to match the input order. So, every
combination is a subsequence of the input *iterable*.
Equivalent to::
Equivalent to::
def combinations(iterable, r):
def combinations(iterable, r):
...
@@ -446,11 +443,10 @@ loops that truncate the stream.
...
@@ -446,11 +443,10 @@ loops that truncate the stream.
Equivalent to nested for-loops in a generator expression. For example,
Equivalent to nested for-loops in a generator expression. For example,
``product(A, B)`` returns the same as ``((x,y) for x in A for y in B)``.
``product(A, B)`` returns the same as ``((x,y) for x in A for y in B)``.
The leftmost iterators correspond to the outermost for-loop, so the output
The nested loops cycle like an odometer with the rightmost element advancing
tuples cycle like an odometer (with the rightmost element changing on every
on every iteration. This pattern creats a lexicographic ordering so that if
iteration). This results in a lexicographic ordering so that if the
the inputs iterables are sorted, the product tuples are emitted in sorted
inputs iterables are sorted, the product tuples are emitted
order.
in sorted order.
To compute the product of an iterable with itself, specify the number of
To compute the product of an iterable with itself, specify the number of
repetitions with the optional *repeat* keyword argument. For example,
repetitions with the optional *repeat* keyword argument. For example,
...
...
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