The first case is to avoid a creating a list, which is then converted to a set only to throw away the list again. Here we can just create the set right away without a list inbetween. The second case is "if x in [...]:" is better written as "if x in {...}:" as sets provides faster "__contains__" (assuming you are on a "recent enough python3", which britney is). Signed-off-by: Niels Thykier <niels@thykier.net>ubuntu/rebased
parent
77ec8a34f9
commit
686721e91f
Loading…
Reference in new issue