confused about resizing array in Python

Neil Cerutti horpner at yahoo.com
Mon Feb 5 08:22:39 EST 2007


On 2007-02-04, Marc 'BlackJack' Rintsch <bj_666 at gmx.net> wrote:
>> How about the traditional programming languages like C, Pascal
>> or C++?
>
> For a start they don't have a built in list type.  C and Pascal
> don't even have one in the standard library.  C++ has STL
> vectors and if you, the programmer, decide to store pointers in
> it instead of structures or objects then you have something
> like Python's list type.

You need to store some form of smart pointer (rather than a bare
pointer) in C++ standard containers in order to avoid heart, head
and stomach aches. A reference counted pointer type will come
fairly close to Python semantics.

-- 
Neil Cerutti
Eddie Robinson is about one word: winning and losing. --Eddie Robinson's agent
Paul Collier



More information about the Python-list mailing list