[Python-ideas] Async API

Guido van Rossum guido at python.org
Thu Oct 25 16:44:58 CEST 2012


On Thu, Oct 25, 2012 at 6:37 AM, Yury Selivanov <yselivanov.ml at gmail.com> wrote:
> ]On 2012-10-25, at 3:49 AM, Paul Colomiets <paul at colomiets.name> wrote:
>
>> Hi Yury,
>>
>> On Thu, Oct 25, 2012 at 9:18 AM, Yury Selivanov <yselivanov.ml at gmail.com> wrote:
>>> Well, I couldn't resist and just implemented a *proof of concept* myself.
>>> The patch is here: https://dl.dropbox.com/u/21052/gen_in_finally.patch
>>>
>>> The patch adds 'gi_in_finally' read-only property to generator objects.
>>>
>>
>> Why haven't you used my implementation?
>>
>> http://bugs.python.org/issue14730
>
> Because it's a different thing.  Yours is a PEP 419 implementation --
> 'sys.setcleanuphook'.  Mine is a quick hack to add 'gi_in_finally' property
> to generators and see how good/bad it is.

I feel it's a code smell if you need to use this feature a lot. If you
need it rarely, well, use one of the existing work-arounds.

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



More information about the Python-ideas mailing list