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

2018-09-27 Thread Matti Picus
To solve issue #2498, I did some experiments https://github.com/cython/cython/issues/2498#issuecomment-414543549 with hiding direct field access in an external extension type (documented here https://cython.readthedocs.io/en/latest/src/userguide/extension_types.html#external-extension-types).

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

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
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