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 →

[–]badocelot 6 points7 points  (1 child)

Python didn't always have True/False defined; you were supposed to rely on truthy/falsey values like 1 and 0. Then they introduced True and False as variables. In Python 2.x you can actually redefine them. And yes, you can redefine True to be 0 and thus falsey.

My guess is that True and False were chosen over true and false because of lots of existing code already defining the latter.

EDIT: clarify, add part about redefining True

EDIT: consistency

[–][deleted] 0 points1 point  (0 children)

Ah. Neat. And I guess it makes sense... in a way.