[Svnmerge] [PATCH] Indented log patch modified v2

Blair Zajac blair at orcaware.com
Wed Mar 1 09:54:16 PST 2006


Raman Gupta wrote:
> Blair Zajac wrote:
> 
>>>+def prefix_lines(prefix, lines):
>>>+  """Given a string representing lines of text,
>>>+  insert the specified prefix at the begining of each line,
>>>+  and return the result."""
>>>+
>>>+  if len(lines) > 0:
>>>+      return "\n".join([prefix + L for L in lines.split("\n")])
>>
>>Isn't this a list comprehensions that isn't supported by older Pythons? 
>>svnmerge.py goes to great lengths to support older versions.
> 
> 
> Apparently they were added in version 2.0 [1].  Just how old are we
> supporting?
> 
> [1] http://www.python.org/peps/pep-0202.html
> 
> I suppose we could always add a function with a fall-back but I don't
> have an older python to experiment with.

No, I thought they were introduced in a newer release of Python.  So that's fine.

Regards,
Blair



More information about the Svnmerge mailing list