<div><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, 6 Jul 2018 at 07:30, Steven D'Aprano <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Jul 05, 2018 at 02:38:47PM -0500, Flavio Curella wrote:<br>
> More than once I've found myself wanting to create a 'sentinel' value. The<br>
> most common use case is to differentiate between an argument that has not<br>
> been provided, and an argument provided with the value `None`.<br>
[...]<br>
> Is this something that the Python community is interested in? I'm willing<br>
> to write the PEP<br>
<br>
I'm definitely interested, and coincidentally I started writing my own <br>
Symbol class a week or two ago (but put it aside unfinished due to other <br>
commitments) but honestly after four months of the assignment expression <br>
PEP I'm suffering from battle fatigue. It would be nice to have a break <br>
from controversial PEPs and catch my breath :-)<br>
</blockquote><div dir="auto"><br></div><div dir="auto">unittest.mock includes a sentinel object, with nice repr. </div><div dir="auto"><br></div><div dir="auto">>>> from unittest.mock import sentinel</div><div dir="auto">>>> sentinel.Foo</div><div dir="auto">sentinel.Foo</div><div dir="auto"><br></div><div dir="auto">Michael</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
-- <br>
Steve<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><pre><a href="http://www.michaelfoord.co.uk/" target="_blank">http://www.michaelfoord.co.uk/</a><br><br>May you do good and not evil<br>May you find forgiveness for yourself and forgive others<br>May you share freely, never taking more than you give.<br>-- the sqlite blessing <a href="http://www.sqlite.org/different.html" target="_blank">http://www.sqlite.org/different.html</a></pre>
</div></div></div>