Open
Description
It essentially returns the same key
if it is present, else returns None (doesn't raise Exception).
Is this the intended use?
def __getitem__(self, key):
for _, item in self.A:
if item == key:
return item
Also, the documentation of PriorityQueue says
It supports dict-like lookup.
What exactly is the method __getitem__
trying to do (and return)?
Metadata
Metadata
Assignees
Labels
No labels