Prefer item in dict over dict.has_key(item)
authorChristian Ebert <blacktrash@gmx.net>
Sun, 20 Jan 2008 14:31:00 +0100
changeset 344 1346cc5a6461
parent 342 abf7ccaf0788
child 345 af2da5e499f2
Prefer item in dict over dict.has_key(item) Message-ID: <4792DB2A.7050909@serpentine.com>
hgkw/keyword.py
--- a/hgkw/keyword.py	Wed Jan 16 11:22:16 2008 +0100
+++ b/hgkw/keyword.py	Sun Jan 20 14:31:00 2008 +0100
@@ -245,7 +245,7 @@
     mf = ctx.manifest()
     if node is not None:   # commit
         _kwtemplater.commitnode = node
-        files = [f for f in ctx.files() if mf.has_key(f)]
+        files = [f for f in ctx.files() if f in mf]
         notify = ui.debug
     else:                  # kwexpand/kwshrink
         notify = ui.note