]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove a dict.has_key() usage in profile to silence a -3 DeprecationWarning.
authorBrett Cannon <bcannon@gmail.com>
Sun, 3 Aug 2008 22:38:19 +0000 (22:38 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sun, 3 Aug 2008 22:38:19 +0000 (22:38 +0000)
Lib/profile.py

index b6048aa0c3719f8e703ce00aaf1b0d2fb5345ead..27d68ba4838b6b3a08c5311009463921acfbb6cf 100755 (executable)
@@ -318,7 +318,7 @@ class Profile:
         fn = ("", 0, self.c_func_name)
         self.cur = (t, 0, 0, fn, frame, self.cur)
         timings = self.timings
-        if timings.has_key(fn):
+        if fn in timings:
             cc, ns, tt, ct, callers = timings[fn]
             timings[fn] = cc, ns+1, tt, ct, callers
         else: