meld r1162 - trunk
- From: vincele svn gnome org
- To: svn-commits-list gnome org
- Subject: meld r1162 - trunk
- Date: Mon, 23 Feb 2009 22:32:26 +0000 (UTC)
Author: vincele
Date: Mon Feb 23 22:32:25 2009
New Revision: 1162
URL: http://svn.gnome.org/viewvc/meld?rev=1162&view=rev
Log:
Inline lambda as it obfuscates the code, use variable before its definition, etc...
Modified:
trunk/diffutil.py
Modified: trunk/diffutil.py
==============================================================================
--- trunk/diffutil.py (original)
+++ trunk/diffutil.py Mon Feb 23 22:32:25 2009
@@ -105,11 +105,10 @@
def _locate_chunk(self, whichdiffs, sequence, line):
"""Find the index of the chunk which contains line."""
- idx = 1 + 2*(sequence != 1)
- line_in_chunk = lambda x: line < c[idx+1]
+ idx = 1 + 2 * (sequence != 1)
i = 0
for c in self.diffs[whichdiffs]:
- if line_in_chunk(c):
+ if line < c[idx + 1]: # Is line in chunk ?
break
else:
i += 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]