confused about resizing array in Python

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Sun Feb 4 04:04:37 EST 2007


In <eq39n7$2b9g$1 at netnews.upenn.edu>, Dongsheng Ruan wrote:

> This seems to be  clever to use reference for list.
> 
> Is it unique to Python?

No of course not.  Java is very similar in only passing references around
for objects.  And `ArrayList` and `Vector` behave similar to Python lists.

> 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.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list