On Wed, Nov 3, 2010 at 11:18 PM, Vitja Makarov <[email protected]> wrote:
> What about closure for classes and nested classes?
>
> I think it should be easy to implement when function closures are done

Function closures were done as part of the last release. Your
metaclass refactoring should make something like this much easier to
implement (make the dict, construct the class).

- Robert

> def gen():
>    a = 1
>    class A:
>         def __call__(self):
>             return a
>    return A
> print gen()()()
>
> class A:
>    class B:
>        pass
>
> 2010/11/4 Robert Bradshaw <[email protected]>:
>> On Wed, Nov 3, 2010 at 9:05 PM, Dan Stromberg <[email protected]> wrote:
>>>
>>> On Wed, Nov 3, 2010 at 10:18 AM, Robert Bradshaw
>>> <[email protected]> wrote:
>>>>
>>>> I think it's time we start thinking about rolling out another release.
>>>
>>> Not a code contribution, so I don't know how much weight this'll carry, but
>>> the two features I miss the most in Cython are yield, and generator
>>> expressions - in that order.
>>
>> The good news is that these are, essentially, one feature.
>>
>>> I use them pretty often in CPython, so when I
>>> got to convert a critical section from CPython to Cython, these language
>>> features appear to need more than just type annotations.
>>
>> They are non-trivial to implement, but certainly on our todo list. I
>> doubt by 0.13.1 though.
>>
>> - Robert
>> _______________________________________________
>> Cython-dev mailing list
>> [email protected]
>> http://codespeak.net/mailman/listinfo/cython-dev
>>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to