Позиционируют как фичу 
Цитата | Notice that in the prior examples, we were not changing the original string with any of the operations we ran on it. Every string operation is defined to produce a new string as its result, because strings are immutable in Python—they cannot be changed in-place after they are created. For example, you can’t change a string by assigning to one of its positions, but you can always build a new one and assign it to the same name. Because Python cleans up old objects as you go (as you’ll see later), this isn’t as inefficient as it may sound:
>>> S 'Spam' >>> S[0] = 'z' # Immutable objects cannot be changed ...error text omittted... TypeError: 'str' object does not support item assignment
|
Learning Python, Third Edition, written by Mark Lutz (O'Reilly, 2008; ISBN: 0596513984). Copyright © 2008 O'Reilly Media
Цитата(ToshaCh @ 10.5.2012, 17:25 ) | Ну и вечный вопрос, что делать. Очевидно, что нужно менять подход к программированию, но как? Т.е. предпологается, что работая со строками я должен исповедовать функциональные подходы, а с числами можно и традиционные? |
По моему проблемы нет и поведение вполне логичное. Ты ведь не можешь обратиться к числу через индексатор, а для строки это просто удобно.
Самый большой баг Python 2, наверно то что функция strftime() уже 10 лет не может работать с датами меньше 1900 года |