r/Python • • Jun 06 '21

News PEP 661 -- Sentinel Values

https://www.python.org/dev/peps/pep-0661/
220 Upvotes

109 comments sorted by

View all comments

Show parent comment

2

u/energybased Jun 06 '21

This is all correct. I think you should still expose the sentinel to facilitate inheritance, for example.

2

u/genericlemon24 Jun 06 '21

That's a great point I forgot to make, thanks! :D

I've put mine in a "public" module, but didn't include it in the API docs; I see attrs does.

1

u/genericlemon24 Jun 10 '21

Hi again! I gathered all my comments in this thread into an article, and took the liberty of including your recommendation about exposing sentinels, I hope that's OK!