On 01/10/2017 05:43 AM, Steven D'Aprano wrote:
Is it silly to create an enumeration with only a single member? That is, a singleton enum?
Don't think so, for the same reason that lists with one element make sense.
def ham(arg): if isinstance(arg, MarxBros) or arg is Unique.FOO: ... Good, bad or indifferent?
Though I'd write def ham(arg): if arg in MarxBros or arg in Unique: ... JM -- https://mail.python.org/mailman/listinfo/python-list