Project

General

Profile

Bug #3118

Change code to implement faster dict lookup

Added by Parag Mhashilkar almost 7 years ago. Updated over 6 years ago.

Status:
New
Priority:
Low
Assignee:
Parag Mhashilkar
Category:
-
Target version:
Start date:
11/09/2012
Due date:
% Done:

0%

Estimated time:
First Occurred:
Occurs In:
Stakeholders:
Duration:

Description

a = {'x': 1, 'y': 2}
a.has_key('x')  # Not allowed in python 3
'x' in a        # Recommended way to check if key exists -- O(1)
'x' in a.keys() # Works but much slower -- O(n)
/pre>

History

#1 Updated by Burt Holzman over 6 years ago

  • Priority changed from Normal to Low
  • Target version changed from v2_7_x to v3_1

#2 Updated by Burt Holzman over 6 years ago

  • Target version changed from v3_1 to v3_x


Also available in: Atom PDF