Re: [Cython] Cython bug ? - Entry.is_arg flag not set for all arguments

2011-08-14 Thread Vitja Makarov
2011/8/12 Vitja Makarov : > 2011/8/12 Stefan Behnel : >> [fixed subject] >> >> Romain Guillebert, 12.08.2011 03:19: >>> >>> I tried to compiled Demos/primes.pyx using the ctypes backend and I >>> think I've found a bug : >>> The Entry for the kmax parameter does not set is_arg to 1. However if I >>

[Cython] Problems with decorated methods in cdef classes

2011-08-14 Thread Stefan Behnel
Hi, I've taken another stab at #593 and changed the way decorators are currently evaluated. http://trac.cython.org/cython_trac/ticket/593 https://github.com/cython/cython/commit/c40ff48f84b5e5841e4e2d2c6dcce3e6494e4c25 We previously had @deco def func(): pass turn into this: d

Re: [Cython] Cython bug ? - Entry.is_arg flag not set for all arguments

2011-08-14 Thread Stefan Behnel
Vitja Makarov, 14.08.2011 16:57: Yeah, that would be really nice if all args including starred ones will have is_arg attribute set. I've fixed the issue https://github.com/vitek/cython/commits/_is_arg It passes all tests if everything is ok I'll push that to upstream Fine with me. Stefan __

Re: [Cython] Cython bug ? - Entry.is_arg flag not set for all arguments

2011-08-14 Thread Vitja Makarov
2011/8/14 Stefan Behnel : > Vitja Makarov, 14.08.2011 16:57: >>> >>> Yeah, that would be really nice if all args including starred ones >>> will have is_arg attribute set. >> >> I've fixed the issue >> https://github.com/vitek/cython/commits/_is_arg >> >> It passes all tests if everything is ok I'l

Re: [Cython] Problems with decorated methods in cdef classes

2011-08-14 Thread Vitja Makarov
2011/8/14 Stefan Behnel : > Hi, > > I've taken another stab at #593 and changed the way decorators are currently > evaluated. > > http://trac.cython.org/cython_trac/ticket/593 > > https://github.com/cython/cython/commit/c40ff48f84b5e5841e4e2d2c6dcce3e6494e4c25 > > We previously had > >    @deco >  

Re: [Cython] Problems with decorated methods in cdef classes

2011-08-14 Thread Stefan Behnel
Vitja Makarov, 14.08.2011 18:55: 2011/8/14 Stefan Behnel: Hi, I've taken another stab at #593 and changed the way decorators are currently evaluated. http://trac.cython.org/cython_trac/ticket/593 https://github.com/cython/cython/commit/c40ff48f84b5e5841e4e2d2c6dcce3e6494e4c25 We previously h

[Cython] Class scope lookup order

2011-08-14 Thread Vitja Makarov
When creating python-class dict it seems that CPython first looks at dict then at globals: A = 1 class X: A = A def y(): A = 3 class Y: A = A return Y Y = y() print(X.A, Y.A) Will print: 1, 1 And not: 1, 3 I didn't find documentation for this but if I'm correct that sho

Re: [Cython] Class scope lookup order

2011-08-14 Thread Vitja Makarov
2011/8/15 Vitja Makarov : > When creating python-class dict it seems that CPython first looks at > dict then at globals: > > A = 1 > class X: >    A = A > > def y(): >    A = 3 >    class Y: >        A = A >    return Y > Y = y() > > print(X.A, Y.A) > > Will print: 1, 1 > And not: 1, 3 > > I didn't