On 02.02.2013 01:23, Greg Ewing wrote:
If you're suggesting that 'def object foo' should give Python
reference semantics and 'cdef object foo' raw C pointer
semantics,
No I was not.
I was suggesting that static declarations of Python and C variables
should have different keywords.
Because they behave differently e.g. with respect to reference counting,
it can be confusing to new users. For example I was replying to a Cython
user who thought anything declared 'cdef' was reference counted. It
might not be obvious to a new Cython user what can be put in a Python
list and what can be put in an STL vector.
"cdef" refers to storage in the generated C, not to the semantics of
Cython. But how and where variables are stored in the generated C is an
implementation detail. Semantically the difference is between static and
dynamic variables.
Sturla
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel