Newbie:Considering using Python. Arrays?, Pointers?

Randall Hopper aa8vb at yahoo.com
Fri May 21 11:18:36 EDT 1999


Tom:
 |I am considering using Python for some programming tasks as opposed to
 |C, C++ etc, which I have used in the past. I bought the book,
 |"Programming Python" and I was attempting to find out what kind of
 |"structure/function" Python uses in terms of indexing data arrays which
 |is equivalent to "C" pointers. I did not read the book thoroughly but I
 |did not come up with anything. So, what does Python use for indexing
 |arrays?

I hear what you're saying, but I'm not to sure what the real underlying
question is.  In C, you can use pointers and integers to access arrays
(a[3], *(a+3), a[2][5], etc.).  In Python, you'd write this similarly:
a[3], a[2][5].  Pointers aren't exposed as a programmer mungable (mutable)
data type.

Possibly you could rephrase with some short example code and we could draw
some parallels.

 |Also, Since Python is an interperted language, as is , say, Java, then
 |what would be the advantage of using Python instead of Java?

I'm assuming this isn't flame bait :-) It's not really fruitful to try and
give a meaningful answer to this question without more details.  What class
of applications are we talking about?  What is the required set of
architectures you need to support?  How much time is available for the
project, or is this a personal learning project?  What is the expected
lifetime of the product?  Do we need to be able to interface with legacy C
or C++ code libraries?  Does it need to run in web browser?  Does it have a
GUI?  etcetc.  More details would allow folks to give some specific advice
and offer comparisons.

Randall




More information about the Python-list mailing list