From: aa8vb at yahoo.com (Randall Hopper)
Date: Fri, 21 May 1999 11:18:36 -0400
Subject: Newbie:Considering using Python. Arrays?, Pointers?
In-Reply-To: <374569FC.D7EC5984@verio.com>; from Tom on Fri, May 21, 1999 at 02:09:12PM +0000
References: <374569FC.D7EC5984@verio.com>
Message-ID: <19990521111836.A500702@vislab.epa.gov>
Content-Length: 1592
X-UID: 1796                                                

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




