New submission from Yury Selivanov:

Attached patch provides an implementation (part of it) of types.coroutine in C.

The problem with the current pure Python implementation is that it copies the 
code object of the generator function, which is a small overhead during import.

I'm not sure if this should be merged in 3.5 at all.  Please take a look at the 

assignee: yselivanov
components: Library (Lib)
files: types_coroutine_speedup.patch
keywords: patch
messages: 244388
nosy: gvanrossum, ncoghlan, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: Speedup types.coroutine()
versions: Python 3.5, Python 3.6
Added file:

Python tracker <>
Python-bugs-list mailing list

Reply via email to