Re: [Python-Dev] Rewrite @contextlib.contextmanager in C

2016年8月08日 13:25:01 -0700

On Mon, Aug 8, 2016 at 10:07 PM, Yury Selivanov <[email protected]>
wrote:
>
>
> On 2016年08月08日 3:33 PM, Giampaolo Rodola' wrote:
>
>> I wanted to give it a try rewriting this in C but since @contextmanager
>> has a lot of magic I wanted to ask first whether this 1) is technically
>> possible 2) is desirable.
>>
>
> It is definitely technologically possible. However, the C implementation
> will be quite complex, and will require a lot of time to review and later
> maintain. My question would be how critical is the performance of
> @contextmanager? I'd say that unless it's used in a tight loop it can't
> affect the performance too much.
>
Yeah, the (my) use case is exactly that (tight loops).
-- 
Giampaolo - http://grodola.blogspot.com
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to