[Tutor] Limitation of int() in converting strings

Alan Gauld alan.gauld at btinternet.com
Wed Jan 2 17:18:17 CET 2013


This is going somewhat off-topic but my curiosity is roused...

On 02/01/13 15:16, Oscar Benjamin wrote:
 >   When the idea was discussed in the run up to Python 3, Guido raised
> exactly this case and said
> """...
> (BTW Pascal also had the division operator right, unlike C, and we're
> ... If we had done it that way, we wouldn't have had to introduce
> the index() builtin and the corresponding infrastructure (__index__
> and a whole slew of C APIs).

I don't get the reference to index here.
Why would adopting Pascal style division remove the need for index?

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list