what is the python equivelant of this?

Mats Kindahl matkin at iar.se
Fri Oct 13 07:12:29 EDT 2000


Neil Schemenauer <nas at arctrix.com> writes:

[snip]

> > or how about
> > 
> > RECORD* recordarray = malloc( sizeof(RECORD) * 10 );
> > memset( recordarray0, sizeof(RECORD) * 10 );
> 
> What is recordarry0?  Maybe something like this is what you want:
> 
>     recordarray = []
>     for i in range(10):
>         recordarray.append(Record(10, "gumby"))

I'm new to Python, but is there anything wrong with:

	recordarray = [0] * 10

-- 
Mats Kindahl, IAR Systems, Sweden

Any opinions expressed are my own, not my company's.



More information about the Python-list mailing list