Python wrapper for C++ STL?

Greg Jorgensen gregj at pobox.com
Sat Dec 9 07:02:18 CET 2000


<shindich at my-deja.com> wrote:

> I am not saying that there is any point in wrapping STL for Python. All
> I'm saying is that STL can be used to write C++ extensions that
> implement specific algorithms.

Sure it could, though C++ + STL = C O D E  B L O A T, so using that combo
for Python modules will likely suck up a lot of memory. If you want some
data structure Python doesn't have--sorted associative containers, for
example--you'd be better off writing a module in C to implement just that,
rather than try to press the STL into service where it won't give you any
benefit.

Anyway the original post that started this all asked about writing a wrapper
for the STL, and that's the issue I was responding to.

--
Greg Jorgensen
Deschooling Society
Portland, Oregon, USA
gregj at pobox.com





More information about the Python-list mailing list