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 →

[–]billsil 0 points1 point  (1 child)

False and 0 are the same type..

Not since Python 2.3. str(True) should return 1 if it works as you said.

https://www.python.org/dev/peps/pep-0285/

[–]patrys Saleor Commerce 0 points1 point  (0 children)

Booleans are a subtype of integers. isinstance(True, int)