Ignore:
Timestamp:
Mar 19, 2014, 11:11:30 AM (11 years ago)
Author:
dmik
Message:

python: Update vendor to 2.7.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/vendor/current/Lib/string.py

    r2 r388  
    509509
    510510# Substring replacement (global)
    511 def replace(s, old, new, maxsplit=-1):
    512     """replace (str, old, new[, maxsplit]) -> string
     511def replace(s, old, new, maxreplace=-1):
     512    """replace (str, old, new[, maxreplace]) -> string
    513513
    514514    Return a copy of string str with all occurrences of substring
    515     old replaced by new. If the optional argument maxsplit is
    516     given, only the first maxsplit occurrences are replaced.
    517 
    518     """
    519     return s.replace(old, new, maxsplit)
     515    old replaced by new. If the optional argument maxreplace is
     516    given, only the first maxreplace occurrences are replaced.
     517
     518    """
     519    return s.replace(old, new, maxreplace)
    520520
    521521
     
    602602    def convert_field(self, value, conversion):
    603603        # do any conversion on the resulting object
    604         if conversion == 'r':
    605             return repr(value)
     604        if conversion is None:
     605            return value
    606606        elif conversion == 's':
    607607            return str(value)
    608         elif conversion is None:
    609             return value
    610         raise ValueError("Unknown converion specifier {0!s}".format(conversion))
     608        elif conversion == 'r':
     609            return repr(value)
     610        raise ValueError("Unknown conversion specifier {0!s}".format(conversion))
    611611
    612612
Note: See TracChangeset for help on using the changeset viewer.