summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2014-04-15 19:06:34 (GMT)
committerGuido van Rossum <guido@python.org>2014-04-15 19:06:34 (GMT)
commit0cbc76880f8a0c12e587c5ee811f7ac7dc0fbf41 (patch)
treeecb5a5523fa4326d3bc9f1bce790773522e05fbc /Lib/asyncio
parent715ef02ddc9c9d175a324dbeddbb7a1c750238ee (diff)
downloadcpython-0cbc76880f8a0c12e587c5ee811f7ac7dc0fbf41.zip
cpython-0cbc76880f8a0c12e587c5ee811f7ac7dc0fbf41.tar.gz
cpython-0cbc76880f8a0c12e587c5ee811f7ac7dc0fbf41.tar.bz2
asyncio: Add gi_{frame,running,code} properties to CoroWrapper (upstream #163).
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/tasks.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index 0785e10..c6c22dd 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -63,6 +63,18 @@ class CoroWrapper:
def close(self):
return self.gen.close()
+ @property
+ def gi_frame(self):
+ return self.gen.gi_frame
+
+ @property
+ def gi_running(self):
+ return self.gen.gi_running
+
+ @property
+ def gi_code(self):
+ return self.gen.gi_code
+
def __del__(self):
frame = self.gen.gi_frame
if frame is not None and frame.f_lasti == -1: