Related to the replace function... I think it's inconsistent with the return value.
The replace function is defined as:
str.replace(old, new[, count])
Return a copy of the string with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.
But...
->>> myStr = 'aaa'
->>> id(myStr.replace('a','c'))
1524508142928
->>> id(myStr.replace('b','c'))
1524508142760
->>> id(myStr)
1524508142760
The definition fits only when it's actually replacing something. What do you think about this?
Regards