Re: [Cython] Enhancing "ctyepdef class numpy.ndarray" with getter properties

2018-09-28 Thread Matti Picus
On 28/09/18 01:20, Robert Bradshaw wrote: On Thu, Sep 27, 2018 at 11:36 PM Matti Picus > wrote: The problem is that when one reads     cdef int aaa there's no indication as to the meaning of this. We also want to be sure to disallow this syntax everywhere bu

Re: [Cython] Enhancing "ctyepdef class numpy.ndarray" with getter properties

2018-09-27 Thread Robert Bradshaw
On Thu, Sep 27, 2018 at 11:36 PM Matti Picus wrote: > On 27/09/18 22:50, Robert Bradshaw wrote: > > > > On Thu, Sep 27, 2018 at 10:38 AM Matti Picus > > mailto:matti.pi...@gmail.com>> wrote: > > To solve issue #2498, I did some experiments > > https://github.com/cython/cython/issu

Re: [Cython] Enhancing "ctyepdef class numpy.ndarray" with getter properties

2018-09-27 Thread Matti Picus
On 27/09/18 22:50, Robert Bradshaw wrote: On Thu, Sep 27, 2018 at 10:38 AM Matti Picus mailto:matti.pi...@gmail.com>> wrote: To solve issue #2498, I did some experiments https://github.com/cython/cython/issues/2498#issuecomment-414543549 with hiding direct field access in

Re: [Cython] Enhancing "ctyepdef class numpy.ndarray" with getter properties

2018-09-27 Thread Robert Bradshaw
Thanks for looking into this! My preference would be to use the @property syntax, as this will be immediately understandable to any Cython user and could contain arbitrary code, rather than just a macro call. There are, however, a couple of downsides. The first is that it may not be clear when ac