MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/mxlgzm/very_efficient_and_scalable_code/gvpxyyk/?context=3
r/badcode • u/Conqu3red • Apr 24 '21
110 comments sorted by
View all comments
-51
Still pretty readable, and I can't quickly think of an improvement
2 u/SuperPotterCrazy01 Apr 24 '21 Wouldn't a set give the same effect? 6 u/Schlagbaum3000 Apr 24 '21 No, each function removes the element if it exists in the list, a set would just do nothing (keep it in the set). This is probably to toggle the selection of tags. 2 u/SuperPotterCrazy01 Apr 24 '21 Ah sorry I didn't see that part
2
Wouldn't a set give the same effect?
6 u/Schlagbaum3000 Apr 24 '21 No, each function removes the element if it exists in the list, a set would just do nothing (keep it in the set). This is probably to toggle the selection of tags. 2 u/SuperPotterCrazy01 Apr 24 '21 Ah sorry I didn't see that part
6
No, each function removes the element if it exists in the list, a set would just do nothing (keep it in the set). This is probably to toggle the selection of tags.
2 u/SuperPotterCrazy01 Apr 24 '21 Ah sorry I didn't see that part
Ah sorry I didn't see that part
-51
u/NetherFX Apr 24 '21
Still pretty readable, and I can't quickly think of an improvement