Re: [Cython] PEP 3135 -- New Super

2011-07-22 Thread Vitja Makarov
2011/7/21 Stefan Behnel : > Robert Bradshaw, 21.07.2011 11:21: >> >> On Thu, Jul 7, 2011 at 2:13 PM, Vitja Makarov wrote: >>> >>> 2011/7/8 mark florisson In descr_get you create and return a new CyFunction with a __self__ set (note, not m_self) and in __call__ you put __self__ in the

Re: [Cython] PEP 3135 -- New Super

2011-07-21 Thread Vitja Makarov
2011/7/22 Stefan Behnel : > Vitja Makarov, 21.07.2011 20:57: >> >> 2011/7/21 Stefan Behnel: >>> >>> Robert Bradshaw, 21.07.2011 11:21: On Thu, Jul 7, 2011 at 2:13 PM, Vitja Makarov wrote: > > 2011/7/8 mark florisson >> >> In descr_get you create and return a new CyFunction

Re: [Cython] PEP 3135 -- New Super

2011-07-21 Thread Stefan Behnel
Vitja Makarov, 21.07.2011 20:57: 2011/7/21 Stefan Behnel: Robert Bradshaw, 21.07.2011 11:21: On Thu, Jul 7, 2011 at 2:13 PM, Vitja Makarov wrote: 2011/7/8 mark florisson In descr_get you create and return a new CyFunction with a __self__ set (note, not m_self) and in __call__ you put __sel

Re: [Cython] PEP 3135 -- New Super

2011-07-21 Thread Vitja Makarov
2011/7/21 Stefan Behnel : > Robert Bradshaw, 21.07.2011 11:21: >> >> On Thu, Jul 7, 2011 at 2:13 PM, Vitja Makarov wrote: >>> >>> 2011/7/8 mark florisson In descr_get you create and return a new CyFunction with a __self__ set (note, not m_self) and in __call__ you put __self__ in the

Re: [Cython] PEP 3135 -- New Super

2011-07-21 Thread Stefan Behnel
Robert Bradshaw, 21.07.2011 11:21: On Thu, Jul 7, 2011 at 2:13 PM, Vitja Makarov wrote: 2011/7/8 mark florisson In descr_get you create and return a new CyFunction with a __self__ set (note, not m_self) and in __call__ you put __self__ in the args tuple and the function as m_self, and then call

Re: [Cython] PEP 3135 -- New Super

2011-07-21 Thread Robert Bradshaw
On Thu, Jul 7, 2011 at 2:13 PM, Vitja Makarov wrote: > > > 2011/7/8 mark florisson >> >> On 7 July 2011 22:39, Vitja Makarov wrote: >> > >> > >> > 2011/7/8 mark florisson >> >> >> >> On 7 July 2011 22:15, Vitja Makarov wrote: >> >> > >> >> > >> >> > 2011/7/7 mark florisson >> >> >> >> >> >> O

Re: [Cython] PEP 3135 -- New Super

2011-07-12 Thread Vitja Makarov
2011/7/12 Stefan Behnel : > mark florisson, 12.07.2011 12:11: >> >> On 12 July 2011 11:46, Vitja Makarov wrote: >>> >>> 2011/7/12 Stefan Behnel Vitja Makarov, 12.07.2011 09:46: > > About cdef classes: probably it's better to > transform super().method(...) into direct form, e.

Re: [Cython] PEP 3135 -- New Super

2011-07-12 Thread Stefan Behnel
mark florisson, 12.07.2011 12:11: On 12 July 2011 11:46, Vitja Makarov wrote: 2011/7/12 Stefan Behnel Vitja Makarov, 12.07.2011 09:46: About cdef classes: probably it's better to transform super().method(...) into direct form, e.g. BaseClass.method(self, ...) Except when it doesn't work. ;

Re: [Cython] PEP 3135 -- New Super

2011-07-12 Thread mark florisson
On 12 July 2011 11:46, Vitja Makarov wrote: > 2011/7/12 Stefan Behnel >> >> Vitja Makarov, 12.07.2011 09:46: >>> >>> About cdef classes: probably it's better to >>> transform super().method(...) into direct form, e.g. BaseClass.method(self, >>> ...) >> >> Except when it doesn't work. ;) >> >>   A

Re: [Cython] PEP 3135 -- New Super

2011-07-12 Thread Vitja Makarov
2011/7/12 Stefan Behnel > > Vitja Makarov, 12.07.2011 09:46: >> >> About cdef classes: probably it's better to >> transform super().method(...) into direct form, e.g. BaseClass.method(self, >> ...) > > Except when it doesn't work. ;) > >   A >  / \ >  B  C >  \ / >   D > > The MRO here is D-B-A-C.

Re: [Cython] PEP 3135 -- New Super

2011-07-12 Thread Stefan Behnel
Vitja Makarov, 12.07.2011 09:46: About cdef classes: probably it's better to transform super().method(...) into direct form, e.g. BaseClass.method(self, ...) Except when it doesn't work. ;) A / \ B C \ / D The MRO here is D-B-A-C. If C unconditionally calls A.method(), A's imple

Re: [Cython] PEP 3135 -- New Super

2011-07-12 Thread Vitja Makarov
2011/7/6 Stefan Behnel > Vitja Makarov, 06.07.2011 09:05: > > 2011/7/6 Stefan Behnel: >> >>> Stefan Behnel, 05.07.2011 10:04: >>> Vitja Makarov, 05.07.2011 09:17: > > 2011/7/5 Stefan Behnel: > >> >> Vitja Makarov, 05.07.2011 08:21: >> >>> >>> I was

Re: [Cython] PEP 3135 -- New Super

2011-07-07 Thread mark florisson
On 7 July 2011 23:13, Vitja Makarov wrote: > > > 2011/7/8 mark florisson >> >> On 7 July 2011 22:39, Vitja Makarov wrote: >> > >> > >> > 2011/7/8 mark florisson >> >> >> >> On 7 July 2011 22:15, Vitja Makarov wrote: >> >> > >> >> > >> >> > 2011/7/7 mark florisson >> >> >> >> >> >> On 6 July 2

Re: [Cython] PEP 3135 -- New Super

2011-07-07 Thread Vitja Makarov
2011/7/8 mark florisson > On 7 July 2011 22:39, Vitja Makarov wrote: > > > > > > 2011/7/8 mark florisson > >> > >> On 7 July 2011 22:15, Vitja Makarov wrote: > >> > > >> > > >> > 2011/7/7 mark florisson > >> >> > >> >> On 6 July 2011 10:01, Vitja Makarov wrote: > >> >> > 2011/7/6 Stefan Behn

Re: [Cython] PEP 3135 -- New Super

2011-07-07 Thread mark florisson
On 7 July 2011 22:39, Vitja Makarov wrote: > > > 2011/7/8 mark florisson >> >> On 7 July 2011 22:15, Vitja Makarov wrote: >> > >> > >> > 2011/7/7 mark florisson >> >> >> >> On 6 July 2011 10:01, Vitja Makarov wrote: >> >> > 2011/7/6 Stefan Behnel : >> >> >> Vitja Makarov, 06.07.2011 09:05: >>

Re: [Cython] PEP 3135 -- New Super

2011-07-07 Thread Vitja Makarov
2011/7/8 mark florisson > On 7 July 2011 22:15, Vitja Makarov wrote: > > > > > > 2011/7/7 mark florisson > >> > >> On 6 July 2011 10:01, Vitja Makarov wrote: > >> > 2011/7/6 Stefan Behnel : > >> >> Vitja Makarov, 06.07.2011 09:05: > >> >>> > >> >>> 2011/7/6 Stefan Behnel: > >> > >> S

Re: [Cython] PEP 3135 -- New Super

2011-07-07 Thread mark florisson
On 7 July 2011 22:15, Vitja Makarov wrote: > > > 2011/7/7 mark florisson >> >> On 6 July 2011 10:01, Vitja Makarov wrote: >> > 2011/7/6 Stefan Behnel : >> >> Vitja Makarov, 06.07.2011 09:05: >> >>> >> >>> 2011/7/6 Stefan Behnel: >> >> Stefan Behnel, 05.07.2011 10:04: >> > >> >

Re: [Cython] PEP 3135 -- New Super

2011-07-07 Thread Vitja Makarov
2011/7/7 mark florisson > On 6 July 2011 10:01, Vitja Makarov wrote: > > 2011/7/6 Stefan Behnel : > >> Vitja Makarov, 06.07.2011 09:05: > >>> > >>> 2011/7/6 Stefan Behnel: > > Stefan Behnel, 05.07.2011 10:04: > > > > Vitja Makarov, 05.07.2011 09:17: > >> > >> 2011/7/5 S

Re: [Cython] PEP 3135 -- New Super

2011-07-07 Thread mark florisson
On 7 July 2011 17:09, Vitja Makarov wrote: > 2011/7/6 Vitja Makarov : >> 2011/7/6 Stefan Behnel : >>> Vitja Makarov, 06.07.2011 09:05: 2011/7/6 Stefan Behnel: > > Stefan Behnel, 05.07.2011 10:04: >> >> Vitja Makarov, 05.07.2011 09:17: >>> >>> 2011/7/5 Stefan Behne

Re: [Cython] PEP 3135 -- New Super

2011-07-07 Thread mark florisson
On 6 July 2011 10:01, Vitja Makarov wrote: > 2011/7/6 Stefan Behnel : >> Vitja Makarov, 06.07.2011 09:05: >>> >>> 2011/7/6 Stefan Behnel: Stefan Behnel, 05.07.2011 10:04: > > Vitja Makarov, 05.07.2011 09:17: >> >> 2011/7/5 Stefan Behnel: >>> >>> Vitja Makarov, 05.

Re: [Cython] PEP 3135 -- New Super

2011-07-07 Thread Vitja Makarov
2011/7/6 Vitja Makarov : > 2011/7/6 Stefan Behnel : >> Vitja Makarov, 06.07.2011 09:05: >>> >>> 2011/7/6 Stefan Behnel: Stefan Behnel, 05.07.2011 10:04: > > Vitja Makarov, 05.07.2011 09:17: >> >> 2011/7/5 Stefan Behnel: >>> >>> Vitja Makarov, 05.07.2011 08:21:

Re: [Cython] PEP 3135 -- New Super

2011-07-06 Thread Vitja Makarov
2011/7/6 Stefan Behnel : > Vitja Makarov, 06.07.2011 09:05: >> >> 2011/7/6 Stefan Behnel: >>> >>> Stefan Behnel, 05.07.2011 10:04: Vitja Makarov, 05.07.2011 09:17: > > 2011/7/5 Stefan Behnel: >> >> Vitja Makarov, 05.07.2011 08:21: >>> >>> I was thinking about imple

Re: [Cython] PEP 3135 -- New Super

2011-07-06 Thread Stefan Behnel
Vitja Makarov, 06.07.2011 09:05: 2011/7/6 Stefan Behnel: Stefan Behnel, 05.07.2011 10:04: Vitja Makarov, 05.07.2011 09:17: 2011/7/5 Stefan Behnel: Vitja Makarov, 05.07.2011 08:21: I was thinking about implementing new super() with no arguments. http://trac.cython.org/cython_trac/ticket

Re: [Cython] PEP 3135 -- New Super

2011-07-06 Thread Vitja Makarov
2011/7/6 Stefan Behnel : > Stefan Behnel, 05.07.2011 10:04: >> >> Vitja Makarov, 05.07.2011 09:17: >>> >>> 2011/7/5 Stefan Behnel: Vitja Makarov, 05.07.2011 08:21: > > I was thinking about implementing new super() with no arguments. http://trac.cython.org/cython_trac/tic

Re: [Cython] PEP 3135 -- New Super

2011-07-05 Thread Stefan Behnel
Stefan Behnel, 05.07.2011 10:04: Vitja Makarov, 05.07.2011 09:17: 2011/7/5 Stefan Behnel: Vitja Makarov, 05.07.2011 08:21: I was thinking about implementing new super() with no arguments. http://trac.cython.org/cython_trac/ticket/696 The problem is where to store __class__, I see two option

Re: [Cython] PEP 3135 -- New Super

2011-07-05 Thread Stefan Behnel
Vitja Makarov, 05.07.2011 10:37: 2011/7/5 Stefan Behnel: IMO, the main reason for the heuristic is to prevent class objects from being kept alive by their methods, except for the single case where super() is used. Keeping a class alive just because one of its methods is still used somewhere can

Re: [Cython] PEP 3135 -- New Super

2011-07-05 Thread Vitja Makarov
2011/7/5 Stefan Behnel : > Vitja Makarov, 05.07.2011 09:17: >> >> 2011/7/5 Stefan Behnel: >>> >>> Vitja Makarov, 05.07.2011 08:21: I was thinking about implementing new super() with no arguments. >>> >>> http://trac.cython.org/cython_trac/ticket/696 >>> The problem is where to store

Re: [Cython] PEP 3135 -- New Super

2011-07-05 Thread Stefan Behnel
Vitja Makarov, 05.07.2011 09:17: 2011/7/5 Stefan Behnel: Vitja Makarov, 05.07.2011 08:21: I was thinking about implementing new super() with no arguments. http://trac.cython.org/cython_trac/ticket/696 The problem is where to store __class__, I see two options here: 1. Add func_class member

Re: [Cython] PEP 3135 -- New Super

2011-07-05 Thread Vitja Makarov
2011/7/5 Stefan Behnel : > Vitja Makarov, 05.07.2011 08:21: >> >> I was thinking about implementing new super() with no arguments. > > Please do :) > > If you start working on it, please assign the ticket to you: > > http://trac.cython.org/cython_trac/ticket/696 > Ok, I'll do this if I start. > >

Re: [Cython] PEP 3135 -- New Super

2011-07-05 Thread Stefan Behnel
Vitja Makarov, 05.07.2011 08:21: I was thinking about implementing new super() with no arguments. Please do :) If you start working on it, please assign the ticket to you: http://trac.cython.org/cython_trac/ticket/696 The problem is where to store __class__, I see two options here: 1. Add

[Cython] PEP 3135 -- New Super

2011-07-04 Thread Vitja Makarov
I was thinking about implementing new super() with no arguments. The problem is where to store __class__, I see two options here: 1. Add func_class member to CyFunction, this way __class__ will be private and not visible for inner functions: 2. Put it into closure Actually, I like the first one.