Flattening lists

Rhamphoryncus rhamph at gmail.com
Sat Feb 7 15:50:22 EST 2009


On Feb 7, 1:39 pm, <mma... at gmx.net> wrote:
> On Sat, 7 Feb 2009 01:06:06 -0800 (PST)
> Rhamphoryncus <rha... at gmail.com> wrote:
>
> > What usecase do you have for such inconsistently structured data?
>
> I have a similar use case in pyspread, which is a Python spreadsheet
> that employs numpy object arrays. Since the Python objects in the numpy
> arrays are derived from user input, they can be anything, including
> nested lists as well as strings, etc.
>
> Since I consider my work-around that treats strings as a special case a
> rather ugly hack, I would welcome a robust, generic approach to the
> OP's problem.

Can you explain this in a little more detail?



More information about the Python-list mailing list