Change a variable name to avoid shadowing a builtin.
author |
Steve Losh <steve@stevelosh.com> |
date |
Fri, 28 Aug 2009 21:22:31 -0400 |
parents |
baca14ea9bc3
|
children |
11987a5cd374
|
branches/tags |
(none) |
files |
t.py |
Changes
--- a/t.py Fri Aug 28 21:21:29 2009 -0400
+++ b/t.py Fri Aug 28 21:22:31 2009 -0400
@@ -61,12 +61,12 @@
"""
prefixes = {}
- for id in ids:
- others = set(ids).difference([id])
- for i in range(1, len(id)+1):
- prefix = id[:i]
+ for task_id in ids:
+ others = set(ids).difference([task_id])
+ for i in range(1, len(task_id)+1):
+ prefix = task_id[:i]
if not any(map(lambda o: o.startswith(prefix), others)):
- prefixes[id] = prefix
+ prefixes[task_id] = prefix
break
return prefixes