'is not' or '!='

Marko Rauhamaa marko at pacujo.net
Tue Aug 19 13:36:53 EDT 2014


Ian Kelly <ian.g.kelly at gmail.com>:

> When I need to do this, I use:
>
>     SENTINEL = object()
>
> It's still a singleton, and why should a sentinel be mutable?

Private enums are often nicer in that they provide str() and repr().


Marko



More information about the Python-list mailing list