'is not' or '!='

Skip Montanaro skip at pobox.com
Tue Aug 19 14:44:31 EDT 2014


On Tue, Aug 19, 2014 at 11:42 AM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> When I need to do this, I use:
>
>     SENTINEL = object()
>
> It's still a singleton, and why should a sentinel be mutable?

Old habits die hard, I guess. I've been using Python since long before
object() existed. :-)

Skip



More information about the Python-list mailing list