Question about Py C API implementation.

A

Adonis

I wrote a small script to flatten a list of lists without the need
of recursion, it works fine for the most part, but was wanting to
reimplement it in C just for kicks, and would give me and excuse to
learn the Python C API, but the C implementation does not function
properly, I *think* it might be how I am trying to copy a sub list that
is found to a list object for seperate processing (line 22, flatten.c),
but also could be where I am trying to pop the topmost from the list
(line 35, flatten.c), but it has me stooped, I lack in C skills so not
many things may be apparent to me immediately, any help is greatly
appreciated.

Adonis

http://home.earthlink.net/~adonisv/flatten.py
http://home.earthlink.net/~adonisv/flatten.c
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,214
Messages
2,571,112
Members
47,704
Latest member
DavidSuita

Latest Threads

Top