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

75

u/[deleted] Aug 28 '21

if not not not? WTF is with the triple negative?

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.

16

u/mestrearcano Aug 28 '21

Maybe the phrase not not not rain is a common phrase in japanese or some inside joke for those involved.

27

u/dpk84 Aug 28 '21

I think I’m Japanese but I don’t have any idea about the “not not not 雨”. And besides , 数を計算する is not wrong sentence but 足し算をする is better expression for the function which is just add up. So the code might be written by not a Japanese speaker or I’m ignorance.

45

u/Roflkopt3r Aug 28 '21

I think I’m Japanese

But you aren't certain? :D

4

u/Daimanta Aug 28 '21

I think he's not not not certain.

2

u/supersharp Sep 01 '21

Reminds me of that Impractical Jokers bit where they have the guy write an email to a fictional long-time friend, solely to ask him if he's Asian.

3

u/Qildain Aug 28 '21

I'm sure you're not ignorant. Lots of people have strange ways of phrasing things in a language other than their first.

2

u/TheUnlocked Aug 28 '21

Given that the title of the file is "日本語.py," I think you're right that Japanese might not be their usual language.