creating array of python objects

Terry Reedy tjreedy at udel.edu
Sun Mar 14 18:51:52 EST 2004


"Faheem Mitha" <faheem at email.unc.edu> wrote in message
news:slrnc594jv.46q.faheem at Chrestomanci.home.earth...
> Dear People,
>
> I have the current modest goal. Given a user defined class, I want to
> creata an array of instances of that class.

Given that the purpose of Numerical Python and NumArray are to make
available fast unboxed raw number array computations, I wonder whether a
plain old simple list of lists wouldn't serve your purpose, at least for
prototyping:

Cells = [[cell(),cell()], [cell(),cell()]]
# easily generalized with nested list comprehensions.

Terry J. Reedy








More information about the Python-list mailing list