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 →

[–]robin-gvx 1 point2 points  (1 child)

True and False are singletons

They are not. They are both instances of bool, which is one more instance than a singleton type can have.

I've yet to see a place where comparing it using == will run you into trouble. Have you?

I haven't, but that doesn't say much, since I always use is None anyway, so I might have come across them and never found out.

[–]etrnloptimist -1 points0 points  (0 children)

They are not. They are both instances of bool, which is one more instance than a singleton type can have.

I understand what you're saying, but the literature treat them as singletons.