News for hackers. Stuff that matters.
Re:[Python-ideas] List Revolution by CJefferson on Saturday September 10, 2011 @12:27PM (#2981817)
I often find 0-based indexing sneaking into other places too.

For example, imagine I want to fake an nm 2d matrix M with an array A, with nm elements

Then with 0-indexing, M[i][j] is stored at A[im+j]. With 1-indexing, M[i][j] is stored at A[(i-1)m+j].

There are no comments on this comment yet.