Porting the 2-3 heap data-structure library from C to Python
stefan_ml at behnel.de
Wed Mar 7 15:52:27 CET 2012
Alec Taylor, 07.03.2012 15:25:
> I am planning to port the 2-3 heap data-structure as described by
> Professor Tadao Takaoka in Theory of 2-3 Heaps published in 1999 and
> available in PDF:
> The source-code used has been made available:
> I plan on wrapping it in a class.
> This tutorial I used to just test out calling C within Python
> and it seems to work, but this might not be the recommended method.
> Any best practices for how best to wrap the 2-3 heap data-structure
> from C to Python?
For data structures, where performance tends to matter, it's usually best
to start with Cython right away, instead of using ctypes.
Here's a tutorial for wrapping a C library with it:
More information about the Python-list