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
ff9284bc
Kaydet (Commit)
ff9284bc
authored
Eki 14, 2002
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Allow Unicode strings as message and module name.
üst
e0fea6c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
warnings.py
Lib/warnings.py
+2
-2
No files found.
Lib/warnings.py
Dosyayı görüntüle @
ff9284bc
...
@@ -128,10 +128,10 @@ def filterwarnings(action, message="", category=Warning, module="", lineno=0,
...
@@ -128,10 +128,10 @@ def filterwarnings(action, message="", category=Warning, module="", lineno=0,
Use assertions to check that all arguments have the right type."""
Use assertions to check that all arguments have the right type."""
assert
action
in
(
"error"
,
"ignore"
,
"always"
,
"default"
,
"module"
,
assert
action
in
(
"error"
,
"ignore"
,
"always"
,
"default"
,
"module"
,
"once"
),
"invalid action:
%
s"
%
`action`
"once"
),
"invalid action:
%
s"
%
`action`
assert
isinstance
(
message
,
str
),
"message must be a string"
assert
isinstance
(
message
,
basestring
),
"message must be a string"
assert
isinstance
(
category
,
types
.
ClassType
),
"category must be a class"
assert
isinstance
(
category
,
types
.
ClassType
),
"category must be a class"
assert
issubclass
(
category
,
Warning
),
"category must be a Warning subclass"
assert
issubclass
(
category
,
Warning
),
"category must be a Warning subclass"
assert
isinstance
(
module
,
str
),
"module must be a string"
assert
isinstance
(
module
,
basestring
),
"module must be a string"
assert
isinstance
(
lineno
,
int
)
and
lineno
>=
0
,
\
assert
isinstance
(
lineno
,
int
)
and
lineno
>=
0
,
\
"lineno must be an int >= 0"
"lineno must be an int >= 0"
item
=
(
action
,
re
.
compile
(
message
,
re
.
I
),
category
,
item
=
(
action
,
re
.
compile
(
message
,
re
.
I
),
category
,
...
...
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