You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As uncovered here, there's a lack of clarity in how attributes get packaged for Cython's Extension Types. While the bindings outwardly presents their attributes in a Pythonic way, they can't always be interacted with in a Pythonic style. Often the getters/setters is actually a translation step to convert values between Python and C.
In this specific example, the setter makes sure that the Python list elements are packages in a contiguous memory for C consumption. The getter returns a copy of each element in a Python list. Both behaviors are unnatural for Python users and we should document that there's an emphasis to use the getter/setter directly.