receive_scans takes a mutable default argument beacons. Any changes to mutable default arguments persist, thus might result in unintended side-effects. See more here. receive_scans does not mutate the beacons list, but the problem can appear due to code of a user of the class.
Additionally, now == None comparison is not recommended. However, this could cause a problem only if now variable is of custom class.
receive_scanstakes a mutable default argumentbeacons. Any changes to mutable default arguments persist, thus might result in unintended side-effects. See more here.receive_scansdoes not mutate thebeaconslist, but the problem can appear due to code of a user of the class.Additionally,
now == Nonecomparison is not recommended. However, this could cause a problem only ifnowvariable is of custom class.