scoder
scoder
I wonder if this is the right approach. The parser creates a `MemoryViewSliceTypeNode` and then wraps that in a `CythonArrayNode`. It doesn't look at index nodes at all. Why doesn't...
So, there is already code to analyse a memoryview slice expression as type, obviously, but it rejects anything that specifies a size and only allows to define a step value...
Interesting. It ~probably~ allows over-allocation and thus doesn't crash immediately, but might still crash if you do this often enough. https://github.com/python/cpython/blob/4372011928b43d369be727ed3eb6d9d4f9610660/Objects/bytearrayobject.c#L541-L547
I'll look into optimising these type checks. Should be easy enough.
3.1.x commit is https://github.com/cython/cython/commit/45dc72dcbe2ea4984dd68d4e4dfa8a992f2121b3
> In principle it could be extended to other shared types if useful (e.g. generator, coroutine). Those already have ABCs in `collections.abc`: https://docs.python.org/3/library/collections.abc.html#collections-abstract-base-classes
I created https://github.com/python/cpython/issues/131983 in CPython
>That's definitely what I intended to do and I think that's what I've done. Ah, yes, sorry. I misread which module you used there. Either way, I think CPython and...
I agree that this shouldn't affect `==` comparison. There is a difference between `same_as()` and `==` , especially because the latter is used for hashing, deduplication, etc.
Worth verifying, but I think a `cimport` doesn't re-export the name and only makes it available internally. This is usually what people want in `.pyx` files. There might be an...