r/badcode • • Apr 11 '21

python Polyglot

Post image
1.2k Upvotes

116 comments sorted by

View all comments

1

u/ikoniq93 Apr 13 '21

Just to make sure I'm reading this clusterfuck right...

We're using JIT compilation of C code to find if a number is even or odd, then handing that off to the rest of the script as a boolean to continue to run?

Wouldn't it be easier to just do the number mod 2 and then use an if statement to return false if the result isn't zero?

tbf i'm not super familiar with python but that just seems to be the logical answer to me.