|
|
|
Move loop attribute to _FlowControlMixin
Patch Set 1 #
Total comments: 2
Total messages: 5
|
GvR
Good catch. LGTM.
|
11 years, 2 months ago (2014年11月03日 03:03:47 UTC) #1 | |||||||||||||||||||||||||||||||||||||||||||
Good catch. LGTM.
https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py File asyncio/transports.py (right): https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py#newcode243 asyncio/transports.py:243: assert loop is not None assert is inconsistent with ctor signature: looking on __init__ the loop parameter has default None value.
https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py File asyncio/transports.py (right): https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py#newcode243 asyncio/transports.py:243: assert loop is not None assert is inconsistent with ctor signature: looking on __init__ the loop parameter has default None value.
https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py File asyncio/transports.py (right): https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py#newcode243 asyncio/transports.py:243: assert loop is not None On 2014年11月05日 15:39:50, Andrew Svetlov wrote: > assert is inconsistent with ctor signature: looking on __init__ the loop > parameter has default None value. Well, that's right but I wanted to use the same prototype than other classes. Example with Future: def __init__(self, *, loop=None):
On 2014年11月05日 15:49:27, haypo_gmail wrote: > https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py > File asyncio/transports.py (right): > > https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py#newcode243 > asyncio/transports.py:243: assert loop is not None > On 2014年11月05日 15:39:50, Andrew Svetlov wrote: > > assert is inconsistent with ctor signature: looking on __init__ the loop > > parameter has default None value. > > Well, that's right but I wanted to use the same prototype than other classes. > Example with Future: > > def __init__(self, *, loop=None): Yes, Future and others can be constructed with implicit event loop. But every transport in asyncio requires explicit pass of loop parameter.