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
bb2839b6
Kaydet (Commit)
bb2839b6
authored
Ara 27, 2016
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #29055: Suppress upstream exception for random.choice()
üst
246cbf23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
random.py
Lib/random.py
+1
-1
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/random.py
Dosyayı görüntüle @
bb2839b6
...
@@ -254,7 +254,7 @@ class Random(_random.Random):
...
@@ -254,7 +254,7 @@ class Random(_random.Random):
try
:
try
:
i
=
self
.
_randbelow
(
len
(
seq
))
i
=
self
.
_randbelow
(
len
(
seq
))
except
ValueError
:
except
ValueError
:
raise
IndexError
(
'Cannot choose from an empty sequence'
)
raise
IndexError
(
'Cannot choose from an empty sequence'
)
from
None
return
seq
[
i
]
return
seq
[
i
]
def
shuffle
(
self
,
x
,
random
=
None
):
def
shuffle
(
self
,
x
,
random
=
None
):
...
...
Misc/NEWS
Dosyayı görüntüle @
bb2839b6
...
@@ -42,6 +42,9 @@ Library
...
@@ -42,6 +42,9 @@ Library
- Issue 28923: Remove editor artifacts from Tix.py.
- Issue 28923: Remove editor artifacts from Tix.py.
- Issue #29055: Neaten-up empty population error on random.choice()
by suppressing the upstream exception.
- Issue #28871: Fixed a crash when deallocate deep ElementTree.
- Issue #28871: Fixed a crash when deallocate deep ElementTree.
- Issue #19542: Fix bugs in WeakValueDictionary.setdefault() and
- Issue #19542: Fix bugs in WeakValueDictionary.setdefault() and
...
...
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