Koshdukai's Rants, Thoughts & Whatnots
2005-11-28
  Why Python, why ?

Why, oh why does Python make me use something like
str="123456789"; ini=5; end=7; str[ini-1:end]
when I want the substring from the 5th to the 7th chars ? :(

Wouldn't it be more logical to start indexes with 1 and the end limit be inclusive so I could simply use something like str[5:7] so one could read it like "str's 5th to 7th chars" ?

*sigh*

Another kinda stupid thing is the integer output of 2 /3 having to resort to one non-integer to output a decimal output, like 2.0 / 3 or 2 / 3.0

*double-sigh*

...to be continued...
 
Comments: Post a Comment



<< Home
This is mainly a personal (though public) place where I put some notes, thoughts or comments about something I wish to remember later.

Previous Posts

ARCHIVES



Powered by Blogger