Should `cython.declare`, `cython.pointer` and so on be strictly considered not `in_c_type_context`?
See original GitHub issueShould cython.declare
, cython.pointer
and so on be strictly considered not in_c_type_context
? At least for .py files?
_Originally posted by @0dminnimda in https://github.com/cython/cython/issues/4606#issuecomment-1179806535_
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I agree with @da-woods that the main distinction point is currently user intent, and we should leave it at that. ISTM that
cython.declare(int)
now interpretsint
as C int, which is the intended behaviour. I added a test. https://github.com/cython/cython/commit/6414a07ec88b60d604daf0e51fd850ee974afdcbI argue that
cython.declare(cython.pointer(cython.double))
==cython.declare(cython.pointer(float))
But I can see that both interpretations can lead to misunderstandings and unexpected behaviour. Now it’s about what will cause less of it