exception safe list/tuple replacing for non-str values
Merge pull request #2371 from stoned/list-replacement-type-fix

exception safe list/tuple replacing for non-str values