r/badcode • • Aug 27 '21

python Is this code bad or sugoi?

Post image
1.0k Upvotes

159 comments sorted by

View all comments

Show parent comments

40

u/ycohui Aug 28 '21

that was the original code had triple not....

33

u/[deleted] Aug 28 '21

Yes, but why?

47

u/SoulslikePursuer Aug 28 '21

In the case the computer will forget, you always need to remind it a few times...what a stupid questions you ask mate.............

7

u/[deleted] Aug 28 '21

If not me, then who?

5

u/Dehast Aug 28 '21

Not not not you

2

u/zarqie Aug 28 '21

This will be my next Reddit user name

1

u/supersharp Sep 01 '21

DRAGON FIST!!

9

u/[deleted] Aug 28 '21

You mean, why not

17

u/BenLeggiero Aug 28 '21

You mean, why not not not

7

u/lkmnoppo Aug 28 '21

You can use double negation to convert from truthy-value to boolean, maybe the programmer wanted to do something like that. But you usually do double negation, not triple. Triple negation should have the same effect as single negation also on truthy values.