On 20/12/2016 00:49, Steve D'Aprano wrote:
On Mon, 19 Dec 2016 03:21 am, BartC wrote:
On 18/12/2016 10:59, Paul Götze wrote:
Hi John,
there is a nice short article by E. W. Dijkstra about why it makes sense
to start numbering at zero (and exclude the upper given bound) while
slicing a list. M
On Mon, 19 Dec 2016 03:21 am, BartC wrote:
> On 18/12/2016 10:59, Paul Götze wrote:
>> Hi John,
>>
>> there is a nice short article by E. W. Dijkstra about why it makes sense
>> to start numbering at zero (and exclude the upper given bound) while
>> slicing a list. Might give a bit of additional u
BartC wrote:
But if you needed a table of the frequencies of letters A to Z...
An N-based array can simply have bounds of ord('A') to ord('Z')
inclusive.
That's fine if your language lets you have arrays with
arbitrary lower bounds.
But if the language only allows a fixed lower bound, and
fur
Jussi Piitulainen writes:
> Ben Bacarisse writes:
>
>> BartC writes:
>>
>>> You need to take your C hat off, I think.
>>
>> It's a computing hat. Indexes are best seen as offsets (i.e. as a
>> measured distances from some origin or base). It's a model that grew
>> out of machine addressing and
On 19/12/2016 13:48, Ben Bacarisse wrote:
BartC writes:
You need to take your C hat off, I think.
It's a computing hat. Indexes are best seen as offsets (i.e. as a
measured distances from some origin or base).
A 1-based or N-based index can still be seen as an offset from element
0, if
Ben Bacarisse writes:
> BartC writes:
>
>> You need to take your C hat off, I think.
>
> It's a computing hat. Indexes are best seen as offsets (i.e. as a
> measured distances from some origin or base). It's a model that grew
> out of machine addressing and assembler address modes many, many
> d
BartC writes:
> On 19/12/2016 01:10, Ben Bacarisse wrote:
>> BartC writes:
>>
>>> On 18/12/2016 10:59, Paul Götze wrote:
there is a nice short article by E. W. Dijkstra about why it makes sense
to start numbering at zero (and exclude the upper given bound) while
slicing a list. Mi
On Sunday, December 18, 2016 at 11:21:38 AM UTC-5, BartC wrote:
> On 18/12/2016 10:59, Paul Götze wrote:
> > Hi John,
> >
> > there is a nice short article by E. W. Dijkstra about why it makes sense
> > to start numbering at zero (and exclude the upper given bound) while
> > slicing a list. Might g
On 19/12/2016 01:10, Ben Bacarisse wrote:
BartC writes:
On 18/12/2016 10:59, Paul Götze wrote:
there is a nice short article by E. W. Dijkstra about why it makes sense
to start numbering at zero (and exclude the upper given bound) while
slicing a list. Might give a bit of additional understan
BartC writes:
> On 18/12/2016 10:59, Paul Götze wrote:
>> there is a nice short article by E. W. Dijkstra about why it makes sense
>> to start numbering at zero (and exclude the upper given bound) while
>> slicing a list. Might give a bit of additional understanding.
>>
>> http://www.cs.utexas.ed
On 18/12/2016 22:21, BartC wrote:
On 18/12/2016 21:04, Michael Torrie wrote:
On 12/18/2016 09:21 AM, BartC wrote:
So if you wanted a simple list giving the titles of the chapters in a
book or on a DVD, on the colour of the front doors for each house in a
street, usually you wouldn't be able t
On 18/12/2016 21:04, Michael Torrie wrote:
On 12/18/2016 09:21 AM, BartC wrote:
So if you wanted a simple list giving the titles of the chapters in a
book or on a DVD, on the colour of the front doors for each house in a
street, usually you wouldn't be able to use element 0.
It also depends
On 18Dec2016 16:21, BartC wrote:
On 18/12/2016 10:59, Paul Götze wrote:
there is a nice short article by E. W. Dijkstra about why it makes sense
to start numbering at zero (and exclude the upper given bound) while
slicing a list. Might give a bit of additional understanding.
http://www.cs.utex
On 12/18/2016 09:21 AM, BartC wrote:
> On 18/12/2016 10:59, Paul Götze wrote:
>> Hi John,
>>
>> there is a nice short article by E. W. Dijkstra about why it makes sense
>> to start numbering at zero (and exclude the upper given bound) while
>> slicing a list. Might give a bit of additional understa
On Sun, 18 Dec 2016 16:21:20 +, BartC wrote:
> On 18/12/2016 10:59, Paul Götze wrote:
>> Hi John,
>>
>> there is a nice short article by E. W. Dijkstra about why it makes
>> sense to start numbering at zero (and exclude the upper given bound)
>> while slicing a list. Might give a bit of additi
On 18/12/2016 10:59, Paul Götze wrote:
Hi John,
there is a nice short article by E. W. Dijkstra about why it makes sense
to start numbering at zero (and exclude the upper given bound) while
slicing a list. Might give a bit of additional understanding.
http://www.cs.utexas.edu/users/EWD/ewd08xx/
Hi John,
there is a nice short article by E. W. Dijkstra about why it makes sense
to start numbering at zero (and exclude the upper given bound) while
slicing a list. Might give a bit of additional understanding.
http://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF
- paul
http://www.cs.utexas
On Sat, 17 Dec 2016 11:10:22 -0800, John wrote:
> Hi,
>
>I am new to Python, and I believe it's an easy question. I know R and
>Matlab.
>
>
x=[1,2,3,4,5,6,7]
x[0]
> 1
x[1:5]
> [2, 3, 4, 5] *
>
> My question is: what does x[1:5] mean? By Python
On 17/12/2016 19:10, John wrote:
Hi,
I am new to Python, and I believe it's an easy question. I know R and Matlab.
x=[1,2,3,4,5,6,7]
x[0]
1
x[1:5]
[2, 3, 4, 5]
*
My question is: what does x[1:5] mean?
x[A:B] means the slice consisting of x[A], x[A+1],... x
On 12/17/2016 2:10 PM, John wrote:
Hi,
I am new to Python, and I believe it's an easy question. I know R and Matlab.
x=[1,2,3,4,5,6,7]
x[0]
1
x[1:5]
[2, 3, 4, 5]
*
My question is: what does x[1:5] mean?
The subsequence between slice positions 1 and 5, leng
John wrote:
> Hi,
>
>I am new to Python, and I believe it's an easy question. I know R and
>Matlab.
>
>
x=[1,2,3,4,5,6,7]
x[0]
> 1
x[1:5]
> [2, 3, 4, 5]
> *
>
> My question is: what does x[1:5] mean? By Python's convention, the
> first ele
On Sat, Dec 17, 2016 at 1:10 PM, John wrote:
>
> Hi,
>
>I am new to Python, and I believe it's an easy question. I know R and
> Matlab.
>
>
> >>> x=[1,2,3,4,5,6,7]
> >>> x[0]
> 1
> >>> x[1:5]
> [2, 3, 4, 5]
> *
>
> My question is: what does x[1:5] mean? By Python'
Hi,
I am new to Python, and I believe it's an easy question. I know R and Matlab.
>>> x=[1,2,3,4,5,6,7]
>>> x[0]
1
>>> x[1:5]
[2, 3, 4, 5]
*
My question is: what does x[1:5] mean? By Python's convention, the first
element of a list is indexed as "0". Doesn't x[1
23 matches
Mail list logo