Stupid programming mistake

Posted by Simon Walker on Wed 27 February 2013

So I was coding the other day and had some strange behaviour from one of my Python scripts. I was running two boolean checks which update a variable. Both should be |= types, but it turns out a ! character looks incredibly similar (to my tired eyes at least) to the | character which of course is a completely different boolean operator.

  • Before

wrong

  • After

correct

Always something new!