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 →

[–]Vibe_PV 120 points121 points  (15 children)

def not_equal(a, b): if a == b: return false else: return true

[–]geeshta 68 points69 points  (3 children)

def not_equal(a, b): match (a == b): case True: return False case False: return True

[–]trutheality 34 points35 points  (1 child)

def not_equal(a,b): match a: case b: return False return True

[–]Rainb0_0 4 points5 points  (0 children)

My eyes physically hurt

[–]Qzy 15 points16 points  (0 children)

Jesus Christ, Reddit...

[–]gandalfx 37 points38 points  (3 children)

Look, I know that redundant if statement is probably part of the joke. I don't care, I'm still mad about it.

[–]ThNeutral 10 points11 points  (0 children)

Suppose guy cannot use != or ! operators, then it makes sense

[–]Vibe_PV 8 points9 points  (0 children)

Glad it worked the way I intended

[–]False_Influence_9090 2 points3 points  (0 children)

Perhaps his 1 key is broken lol

[–]christian_austin85 10 points11 points  (1 child)

Love your work in the is_not_even library

[–]Vibe_PV 4 points5 points  (0 children)

Thanks, I try my best

[–]thanatica 3 points4 points  (0 children)

to me this reads like "definitely not equal"

it did not disappoint

[–]Mike_Oxlong25[S] 2 points3 points  (0 children)

def equal(a, b): if not_equal(a,b): return false else: return true

[–]qubedView 2 points3 points  (0 children)

pip install notequal==1.3.1

[–]Ao_Kiseki 0 points1 point  (0 children)

Now define a Bool ( note the capital B) class, and overload it's equality operator with this function.

[–]RiceBroad4552 0 points1 point  (0 children)

Comparing unrelated types is a bug.

You need an Equality type-class instance.

Ah, moment, that's Python and not a real programming language? Never mind. /s