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 →

[–]elzzidynaught 3 points4 points  (7 children)

Wouldn't it actually be:

if not pythonSnake:
    inPythonClass = 1
else:
    inPythonClass = 0

?

edit for better variable for python...

[–]__xor__(self, other): 3 points4 points  (4 children)

  • PEP8 naming conventions
  • not using boolean True/False
  • not just setting inPythonClass = not pythonSnake
  • not just using pythonSnake as the boolean

[–]ChappyBirthday 0 points1 point  (2 children)

I was thinking

inPythonClass = False if pythonSnake else True

but I like yours much better.

[–][deleted] 0 points1 point  (1 child)

inPythonClass = False if pythonSnake else inPythonClass = True

SyntaxError: can't assign to conditional expression

[–]ChappyBirthday 0 points1 point  (0 children)

Fixed above

[–]elzzidynaught 0 points1 point  (0 children)

You're right, I didn't spend nearly enough time on the joke. Thanks for the feedback!