meld r1294 - trunk
- From: vincele svn gnome org
- To: svn-commits-list gnome org
- Subject: meld r1294 - trunk
- Date: Thu, 26 Mar 2009 22:23:58 +0000 (UTC)
Author: vincele
Date: Thu Mar 26 22:23:58 2009
New Revision: 1294
URL: http://svn.gnome.org/viewvc/meld?rev=1294&view=rev
Log:
Pylint warns about redefining the object & list builtins,
rename those variable to "obj" & "alist"
Modified:
trunk/misc.py
Modified: trunk/misc.py
==============================================================================
--- trunk/misc.py (original)
+++ trunk/misc.py Thu Mar 26 22:23:58 2009
@@ -135,14 +135,14 @@
def __cmp__(self, other):
return cmp(self.__dict__, other.__dict__)
-def all_equal(list):
+def all_equal(alist):
"""Return true if all members of the list are equal to the first.
An empty list is considered to have all elements equal.
"""
- if len(list):
- first = list[0]
- for n in list[1:]:
+ if len(alist):
+ first = alist[0]
+ for n in alist[1:]:
if n != first:
return 0
return 1
@@ -162,9 +162,9 @@
pass
else:
if all_equal(basenames):
- def firstpart(list):
- if len(list) > 1:
- return "[%s] " % list[0]
+ def firstpart(alist):
+ if len(alist) > 1:
+ return "[%s] " % alist[0]
else:
return ""
roots = map(firstpart, paths)
@@ -230,13 +230,13 @@
pipe.tochild.close()
return pipe.wait()
-def safe_apply(object, method, args):
- """Call 'object.method(args)' if 'object' has an attribute named 'method'.
+def safe_apply(obj, method, args):
+ """Call 'obj.method(args)' if 'obj' has an attribute named 'method'.
- If 'object' has no method 'method' this is a no-op.
+ If 'obj' has no method 'method' this is a no-op.
"""
try:
- m = getattr(object,method)
+ m = getattr(obj, method)
except AttributeError:
pass
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]