BTW, matlab has 1-based indexing too. Maple has both: there is an array object that can be 0,1,2,... based and a List object that is 1-based. I think it would be nice to have an iterator object similar to (1:n) in matlab (but not a list object).
didier 2007/9/18, Joel B. Mohler <[EMAIL PROTECTED]>: > > On Tuesday 18 September 2007 14:34, Robert Bradshaw wrote: > > I still like the [a..b] notation that makes > > things totally obvious, and I am as surprised as Peter Doyle at the > > shift of topic of whether or not indices should be 0-based (which we > > don't have a choice about while sticking with Python). > > Well, I'll respond as to why I think they are exactly the same issue (in > spirit) since I'm the one who brought up 0-based vs. 1-based. To me, it is > very very intuitive that range(10) has 10 elements. The only serious point > of contention is where those 10 elements start. That's why I think that > these are the same issues. > > I'll also say that I didn't mean to open this can of worms. It was just on my > mind at the time and I don't really expect us to preparse or change python to > work around this. However, I could fully understand why anyone would think > it a royal pain in the neck. When trying to compute something that you read > on paper, it is a continual conversion and a very confusing conversion. > After all, one of the classic source of programming errors is "off-by-one". > > -- > Joel > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---