On Thu, Jul 05, 2018 at 02:38:47PM -0500, Flavio Curella wrote:
> More than once I've found myself wanting to create a 'sentinel' value. The
> most common use case is to differentiate between an argument that has not
> been provided, and an argument provided with the value `None`.
[...]
> Is this something that the Python community is interested in? I'm willing
> to write the PEP
I'm definitely interested, and coincidentally I started writing my own
Symbol class a week or two ago (but put it aside unfinished due to other
commitments) but honestly after four months of the assignment expression
PEP I'm suffering from battle fatigue. It would be nice to have a break
from controversial PEPs and catch my breath :-)
unittest.mock includes a sentinel object, with nice repr.
>>> from unittest.mock import sentinel
>>> sentinel.Foo
sentinel.Foo
Michael
--
Steve
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/