parameters: (start, stop)
return_statement: return '{},{}'.format(beginning, length)
docstring: Convert range to the "ed" format
docstring_summary: Convert range to the "ed" format
docstring_tokens: Convert range to the ed format
function: def _format_range_unified(start, stop):
      'Convert range to the "ed" format'
      # Per the diff spec at http://www.unix.org/single_unix_specification/
      beginning = start + 1     # lines start numbering with one
      length = stop - start
      if length == 1:
          return '{}'.format(beginning)
      if not length:
          beginning -= 1        # empty ranges begin at line just before the range
      return '{},{}'.format(beginning, length)
function_tokens: def _format_range_unified ( start , stop ) : # Per the diff spec at http://www.unix.org/single_unix_specification/ beginning = start + 1 # lines start numbering with one length = stop - start if length == 1 : return '{}' . format ( beginning ) if not length : beginning -= 1 # empty ranges begin at line just before the range return '{},{}' . format ( beginning , length )