[Python-checkins] r65440 - python/trunk/Lib/profile.py

brett.cannon python-checkins at python.org
Mon Aug 4 00:38:20 CEST 2008


Author: brett.cannon
Date: Mon Aug  4 00:38:19 2008
New Revision: 65440

Log:
Remove a dict.has_key() usage in profile to silence a -3 DeprecationWarning.


Modified:
   python/trunk/Lib/profile.py

Modified: python/trunk/Lib/profile.py
==============================================================================
--- python/trunk/Lib/profile.py	(original)
+++ python/trunk/Lib/profile.py	Mon Aug  4 00:38:19 2008
@@ -318,7 +318,7 @@
         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:


More information about the Python-checkins mailing list