scoder

Results 650 comments of scoder

> * How do we want to handle properties with different names ([`memoryview.nbytes`](https://docs.python.org/3/library/stdtypes.html#memoryview.nbytes) maps to [`Py_buffer.len`](https://docs.python.org/3/c-api/buffer.html#c.Py_buffer.len))? Presumably we want the former name, but how to map to the latter? I'd...

This looks like a broken Cython installation. I suggest deleting and rebuilding your venv to get a clean package installation, and then trying again.

I find it reasonable to support and optimise both list() and tuple() on memory views. Lists seem more interesting than tuples, though. What's your user case for tuples?

The right place to replace the generic Python builtin calls with dedicated C code is probably here: https://github.com/cython/cython/blob/7beedb19c43f3e865056b8181e55897b222a645b/Cython/Compiler/Optimize.py#L2491 https://github.com/cython/cython/blob/7beedb19c43f3e865056b8181e55897b222a645b/Cython/Compiler/Optimize.py#L2512 Look for `create_to_py_utility_code()` and `to_py_function` on the memory view's dtype to...

Or, use a Cython utility code section, like we do for the C++ STL conversions in `CppConvert.pyx`.

> It's "kind of safe" - in that you have to keep a reference alive to it (like bytes) but also not resize it from this or another thread. Yes,...

> I'm still a little suspicious of the entries on types, Yes, this feels strange. Let me take a more thorough look.

> Several function declarations are encapsulated within macros That's fine and is done for performance reasons. Macros and inline functions should not be moved to the shared module but always...

> Not sure whether the saved space is worth of code complexity Let's consider this a feature for larger Cython based packages with many modules, all built at the same...