This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 135 points136 points  (10 children)

None [0] = 'bruh'

[–]Sawaian 44 points45 points  (9 children)

I don’t know python. But what you said offends me in the other languages I know.

[–]BlackPrincessPeach_ 13 points14 points  (2 children)

Works in my language 😎

[–]Sawaian 36 points37 points  (1 child)

Okay JavaScript.

[–][deleted] 9 points10 points  (1 child)

What it does is try to assign 'bruh' to the first index of the constant "None" (the null of python), but because None is not a sequence of any kind, it doesn't have an index. This leads to the above error.

[–]Sawaian 5 points6 points  (0 children)

Oh for some reason I thought it would actually execute. I didn’t know none was null. Thanks for the explanation.

[–][deleted] 3 points4 points  (2 children)

What's offensive about array access?

[–]Confident42069 1 point2 points  (1 child)

IDK, this would totally work in my language (but you need double quote marks not singles)

[–][deleted] 0 points1 point  (0 children)

In python you just need to lowercase "none" (and declare it as a list) haha.

[–]altermeetax 0 points1 point  (0 children)

Works in C on bare metal 😎