I have a tuple struct in my Python code that declares the following:
match_entry = (util.frozendict(rule_match), priority, version)
When I print match_entry, I see the following:
print match_entry
({'switch': 1, 'dstmac': 00:00:00:00:00:01, 'srcmac': 00:00:00:00:00:01}, 60000, 5)
I am searching for this particular tuple a dict of tuples, let's call it dict_of_tuples; the corresponding output for the dict is below.
print dict_of_tuples
{({'switch': 5, 'dstmac': '00:00:00:00:00:00', 'srcmac': '00:00:00:00:00:01'}, 59999, 7): [CountBucket 140271056467472, CountBucket 140271056411280], ({'switch': 5, 'dstmac': '00:00:00:00:00:00', 'srcmac': '00:00:00:00:00:01'}, 59999, 5): [CountBucket 140271056467472, CountBucket 140271056411280], ({'switch': 1, 'dstmac': '00:00:00:00:00:01', 'srcmac': '00:00:00:00:00:01'}, 60000, 5): [CountBucket 140271057099664, CountBucket 140271056501008]}
However, when I check if the match entry is in the tuple:
if match_entry in dict_of_tuples:
I do not see any results, even though the match_entry is clearly in dict_of_tuple. Any reason why this would be the case?