Message 246123 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Content
> Oh, wait, I was confusing myself.  This is that new module you guys created for type hints, and this is a new object with no installed base.  (Right?)

No, you were right in your previous comment...

> Help me to understand here.  You want to check in a patch adding 300 new lines of C code to the types module during beta, for a speed optimization, after we've already hit beta?

> While I like speedups as much as the next guy, I would be happier if this waited for 3.6.

This speedup will mostly affect code compiled with Cython. See the following example:
  
  @asyncio.coroutine
  def coro():
     yield from ...

Cython will compile "coro" into a function, that returns a generator-like object.  "asyncio.coroutine" will wrap this function, and, therefore, the optimized by Cython generator-like object will be wrapped too (to provide an __await__ method).

This patch provides a faster wrapper for such generator-like objects. Since the whole point of using Cython is to squeeze as much performance as possible, I think it's essential to have this optimization in 3.5 (or at least in 3.5.1 as Guido suggested).

It's a lot of C code, I agree. I only can say that I did my best to write very extensive unittests, and so I hope that it won't cause any trouble.