
May 25, 2021
6:49 p.m.
On Tue, May 25, 2021 at 1:08 PM Pascal Chambon <pythoniks@gmail.com> wrote:
I feel like the 3-lines declaration of a new sentinel would discourage a bit its adoption compared to just "sentinel = object()"
How about one line? class Missing(Sentinel): pass And avoiding a lot of complications? https://github.com/fluentpython/example-code-2e/blob/master/25-class-metapro... Cheers, Luciano -- Luciano Ramalho | Author of Fluent Python (O'Reilly, 2015) | http://shop.oreilly.com/product/0636920032519.do | Technical Principal at ThoughtWorks | Twitter: @ramalhoorg