On 05/03/15 01:53, Phil wrote:
I hope this is not another embarrassingly obvious answer to a simple
question.
Python 3, under Kubuntu.
xrange() fails whereas range() is accepted. Could this be an
installation problem?
There are many incompatible changes in Python v3 compared with v2.
Some are
On 04/03/15 19:10, boB Stepp wrote:
learned of programming via FORTRAN and BASIC (various incarnations).
These used multidimensional array-based thinking.
... I don't recollect anything similar to Python lists
There weren't, and it was a common programming exercise to
create them using arra
On Wed, Mar 04, 2015 at 01:10:11PM -0600, boB Stepp wrote:
> What are the strengths and weaknesses of Python lists compared to "old
> school" arrays?
Python lists are objects, containing a sequence of objects. Objects are
"fatter" than low-level data like machine ints. (They take up more
space.
On 05/03/15 12:20, Steven D'Aprano wrote:
index position. In other words does the array need to be filled
in a sequential manner or could you have a 'hole' in the middle...
I'm not really sure that arrays can have holes in them. Basic low-level
arrays, like found in Pascal, C or Fortran, canno
On Wed, Mar 4, 2015 at 8:53 PM, Phil wrote:
> phil@Asus:~/Python$ python3
> Python 3.4.2 (default, Oct 8 2014, 13:18:07)
> [GCC 4.9.1] on linux
> Type "help", "copyright", "credits" or "license" for more information.
for row in xrange(0,12):
> ... print(row)
> ...
> Traceback (most recen
Thank you very much Alan and Steve for your detailed answers. You
have clarified many things and sent me off searching for more
information on variant records, tagged and untagged unions, sparse
arrays, linked lists, how memory allocation is affected by these
topics and some other items.
And I wo
On 05/03/2015 08:10, Alan Gauld wrote:
On 05/03/15 01:53, Phil wrote:
I hope this is not another embarrassingly obvious answer to a simple
question.
Python 3, under Kubuntu.
xrange() fails whereas range() is accepted. Could this be an
installation problem?
There are many incompatible changes
On 05/03/2015 10:07, Alan Gauld wrote:
On 04/03/15 19:10, boB Stepp wrote:
wanted to address an item in a 3-dimensional array, I would use
something like (x, y, z) whereas the Python list form amounts to
[x][y][z] .
That's just a syntax thing, Python could have allowed single
bracketing of ind
Original Message -
> From: Mark Lawrence
> To: tutor@python.org
> Cc:
> Sent: Thursday, March 5, 2015 9:54 PM
> Subject: Re: [Tutor] Strengths & weaknesses of Python lists compared to "old
> school" arrays [Was "Fixed Vector Array"]
>
> On 05/03/2015 10:07, Alan Gauld wrote:
>> On