Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1ad08a55
Commit
1ad08a55
authored
May 28, 2015
by
Yury Selivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asyncio: Drop some useless code from tasks.py.
See also issue 24017.
parent
46c759d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
Lib/asyncio/tasks.py
Lib/asyncio/tasks.py
+2
-7
No files found.
Lib/asyncio/tasks.py
View file @
1ad08a55
...
...
@@ -74,10 +74,7 @@ class Task(futures.Future):
super
().
__init__
(
loop
=
loop
)
if
self
.
_source_traceback
:
del
self
.
_source_traceback
[
-
1
]
if
coro
.
__class__
is
types
.
GeneratorType
:
self
.
_coro
=
coro
else
:
self
.
_coro
=
iter
(
coro
)
# Use the iterator just in case.
self
.
_coro
=
coro
self
.
_fut_waiter
=
None
self
.
_must_cancel
=
False
self
.
_loop
.
call_soon
(
self
.
_step
)
...
...
@@ -237,10 +234,8 @@ class Task(futures.Future):
try
:
if
exc
is
not
None
:
result
=
coro
.
throw
(
exc
)
elif
value
is
not
None
:
result
=
coro
.
send
(
value
)
else
:
result
=
coro
.
send
(
Non
e
)
result
=
coro
.
send
(
valu
e
)
except
StopIteration
as
exc
:
self
.
set_result
(
exc
.
value
)
except
futures
.
CancelledError
as
exc
:
...
...
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