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
c0215dfb
Kaydet (Commit)
c0215dfb
authored
Kas 09, 2016
tarafından
Yury Selivanov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #28639: Fix inspect.isawaitable to always return bool
Patch by Justin Mayfield.
üst
33499b7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
inspect.py
Lib/inspect.py
+2
-2
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/inspect.py
Dosyayı görüntüle @
c0215dfb
...
@@ -207,10 +207,10 @@ def iscoroutine(object):
...
@@ -207,10 +207,10 @@ def iscoroutine(object):
return
isinstance
(
object
,
types
.
CoroutineType
)
return
isinstance
(
object
,
types
.
CoroutineType
)
def
isawaitable
(
object
):
def
isawaitable
(
object
):
"""Return true i
s
object can be passed to an ``await`` expression."""
"""Return true i
f
object can be passed to an ``await`` expression."""
return
(
isinstance
(
object
,
types
.
CoroutineType
)
or
return
(
isinstance
(
object
,
types
.
CoroutineType
)
or
isinstance
(
object
,
types
.
GeneratorType
)
and
isinstance
(
object
,
types
.
GeneratorType
)
and
object
.
gi_code
.
co_flags
&
CO_ITERABLE_COROUTINE
or
bool
(
object
.
gi_code
.
co_flags
&
CO_ITERABLE_COROUTINE
)
or
isinstance
(
object
,
collections
.
abc
.
Awaitable
))
isinstance
(
object
,
collections
.
abc
.
Awaitable
))
def
istraceback
(
object
):
def
istraceback
(
object
):
...
...
Misc/NEWS
Dosyayı görüntüle @
c0215dfb
...
@@ -450,6 +450,9 @@ Library
...
@@ -450,6 +450,9 @@ Library
- Issue #28613: Fix get_event_loop() return the current loop if
- Issue #28613: Fix get_event_loop() return the current loop if
called from coroutines/callbacks.
called from coroutines/callbacks.
- Issue #28639: Fix inspect.isawaitable to always return bool
Patch by Justin Mayfield.
IDLE
IDLE
----
----
...
...
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