Sunday, July 19, 2015

True = False, Python 2.7

This a quick blog on an anomaly in Python 2.7.

At the >>> prompt, enter

True = False

True

Now think about what you just did, for a second, or a minute.







Now the question is how to correct it?  [see below]

This is an academic exercise. You would never really do this, right?


Is Python 3 better?






Much more sensible, no?

Use 3.+ where you can, n'est pas?





No comments:

Post a Comment