Lack of **kwargs in run_in_executor

924 views
Skip to first unread message

Aaron DeVore

unread,
Dec 18, 2013, 4:57:08 PM12/18/13
to python...@googlegroups.com
I noticed that run_in_executor has an *args, but no **kwargs. Examination of the source code doesn't give any clues on why. Am I missing something or is asyncio missing something?

-Aaron DeVore

Guido van Rossum

unread,
Dec 18, 2013, 5:01:08 PM12/18/13
to Aaron DeVore, python-tulip

Read the PEP.

Aaron DeVore

unread,
Dec 18, 2013, 5:40:07 PM12/18/13
to python...@googlegroups.com, Aaron DeVore, gu...@python.org
I noticed that asyncio is compliant with PEP 3156, but the PEP doesn't say anything about a lack of **kwargs either. PEP 3156 itself seems to be inconsistent with PEP 3148's submit(), which takes a **kwargs.

-Aaron DeVore

Guido van Rossum

unread,
Dec 18, 2013, 5:50:39 PM12/18/13
to Aaron DeVore, python-tulip
On Wed, Dec 18, 2013 at 2:40 PM, Aaron DeVore <aaron....@gmail.com> wrote:
> I noticed that asyncio is compliant with PEP 3156, but the PEP doesn't say
> anything about a lack of **kwargs either.

It does: http://www.python.org/dev/peps/pep-3156/#callback-style

> PEP 3156 itself seems to be
> inconsistent with PEP 3148's submit(), which takes a **kwargs.

Trust me. It is a conscious choice.

> -Aaron DeVore
>
>
> On Wednesday, December 18, 2013 2:01:08 PM UTC-8, Guido van Rossum wrote:
>>
>> Read the PEP.
>>
>> On Dec 18, 2013 1:57 PM, "Aaron DeVore" <aaron....@gmail.com> wrote:
>>>
>>> I noticed that run_in_executor has an *args, but no **kwargs. Examination
>>> of the source code doesn't give any clues on why. Am I missing something or
>>> is asyncio missing something?
>>>
>>> -Aaron DeVore



--
--Guido van Rossum (python.org/~guido)

Aaron DeVore

unread,
Dec 18, 2013, 6:01:46 PM12/18/13
to gu...@python.org, python-tulip
On Wed, Dec 18, 2013 at 2:50 PM, Guido van Rossum <gu...@python.org> wrote:
On Wed, Dec 18, 2013 at 2:40 PM, Aaron DeVore <aaron....@gmail.com> wrote:
> I noticed that asyncio is compliant with PEP 3156, but the PEP doesn't say
> anything about a lack of **kwargs either.

It does: http://www.python.org/dev/peps/pep-3156/#callback-style

Ah, I didn't see that part. I was searching the PEP for kwargs.
 

> PEP 3156 itself seems to be
> inconsistent with PEP 3148's submit(), which takes a **kwargs.

Trust me. It is a conscious choice.

I thought it was probably a conscious choice. Just thought I should check. Sorry for the bother.

-Aaron DeVore
Reply all
Reply to author
Forward
0 new messages