ctypes And The WACAH Principle

Lawrence D’Oliveiro lawrencedo99 at gmail.com
Wed Aug 10 04:22:57 EDT 2016


On Wednesday, August 10, 2016 at 6:35:57 PM UTC+12, Gregory Ewing wrote:

> It's talking about accessing the internals of an object from C or C++ code,
> *not* from Python.

It’s saying that’s “the only way to effectively make use of this information”, which it is not.

> If you're using ctypes anyway, it shouldn't be much harder to
> use ctypes to access the object's buffer interface, if it has
> one.

Yeah, I could probably figure that out ... wonder why it’s not a standard part of ctypes already?

> It will let you create non-leaky wrappers ...

Why would I want to do that?



More information about the Python-list mailing list