Closed ernieIzde8ski closed 4 days ago
The check card_ords == {} will always evaluate to False, even when it is empty. This is because card_ords is a set, and {} is a dictionary.
card_ords == {}
False
card_ords
{}
>>> set() == {} False
The intended check was probably something like "card ords is empty", which can be expressed as if not card_ords.
if not card_ords
Thanks for the PR!
The check
card_ords == {}
will always evaluate toFalse
, even when it is empty. This is becausecard_ords
is a set, and{}
is a dictionary.The intended check was probably something like "card ords is empty", which can be expressed as
if not card_ords
.