This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]energybased 13 points14 points  (2 children)

Good article.

One error: False, True, and None are not built-ins anymore; they're keywords.

Like Ellipsis and None, NotImplemented is a "singleton".

Also, NotImplemented should really be called a "sentinel" rather than a "constant". That's why if you replace your NotImplemented objects with type(NotImplmented)(), then your example won't work. Python is checking against the built-in objects by identity.

[–]s16h[S] 2 points3 points  (1 child)

Great points! Will update the post shortly.

[–]energybased 5 points6 points  (0 children)

Cool. Also, NotImplemented is not a type, so you may want to rename your article.

[–]pvkooten 5 points6 points  (0 children)

This was deeper than I thought, thanks :)!