[Python-bugs-list] [ python-Bugs-827260 ] Parameter is misnamed in str.replace documentation.

SourceForge.net noreply at sourceforge.net
Tue Oct 21 22:59:19 EDT 2003


Bugs item #827260, was opened at 2003-10-20 23:53
Message generated for change (Settings changed) made by fdrake
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=827260&group_id=5470

Category: Documentation
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jeremy Fincher (jemfinch)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Parameter is misnamed in str.replace documentation.

Initial Comment:
>>> print str.replace.__doc__
S.replace (old, new[, maxsplit]) -> string

Return a copy of string S with all occurrences of substring
old replaced by new.  If the optional argument maxsplit is
given, only the first maxsplit occurrences are replaced.

---

Honestly, that optional parameter really shouldn't be
called "maxsplit" since there's no splitting going on.
 Just plain "max" would be better.

----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2003-10-21 22:59

Message:
Logged In: YES 
user_id=3066

Agreed; I've changed the parameter name to simply "count".

Fixed in Objects/stringobject.c revisions 2.212 and 2.209,
Doc/lib/libstdtypes.tex revisions 1.138 and 1.129.8.7.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=827260&group_id=5470



More information about the Python-bugs-list mailing list