[docs] [issue16072] fix documentation of string.replace() signature

Chris Jerdonek report at bugs.python.org
Fri Sep 28 14:37:02 CEST 2012

Chris Jerdonek added the comment:

[Reopening] It looks like at least *some* change is warranted here.  Notice that all the functions document "s" for the string argument but string.replace() documents "str".  However, we have (in 2.7):

>>> string.replace(str='aab', old='a', new='b')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: replace() got an unexpected keyword argument 'str'
>>> string.replace(s='aab', old='a', new='b')

resolution: invalid -> 
stage: committed/rejected -> needs patch
status: closed -> open

Python tracker <report at bugs.python.org>

More information about the docs mailing list