jupyter / jupyter_core

Core Jupyter functionality
https://jupyter-core.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
195 stars 181 forks source link

MAINT: Coro is not coro-function. #330

Closed Carreau closed 1 year ago

Carreau commented 1 year ago

in the following

async def hello():
    return 1

hello is a coroutine function, and hello() a coroutine. Fix the vocabulary and ensure that the function is properly used.

Carreau commented 1 year ago

coroutine function is the official term.

See inspect module iscoroutinefunction and iscoroutine.

Async-def function is ambiguous as it could also be an async-generator-function, which when called would be an async-generator

I mean those things have known, defined meaning, I don't see why we should use a different terminology here.

If you really insist we can change, but coroutine is really the instantiated object, so I'd like not to use it.

davidbrochart commented 1 year ago

Thanks, "coroutine function" seems appropriate then.

Carreau commented 1 year ago

I'm going to close and reopen to trigger CI.

blink1073 commented 1 year ago

The check release failure is unrelated, I'll fix it separately.