Ian Kelly <ian.g.ke...@gmail.com> writes: > On Thu, Jun 28, 2018 at 4:38 AM Ben Finney <ben+pyt...@benfinney.id.au> wrote: > > > > Ethan Furman <et...@stoneleaf.us> writes: > > > > Specifically, I can't make sense of why someone would want to have a > > class that is simultaneously behaving as an enumerated type, *and* > > has an API of custom callable attributes. > > You don't see value in enum members having properties?
Is a Python property a callable attribute? >>> class Lorem: ... @property ... def spam(self): ... print(self) ... >>> foo = Lorem() >>> foo.spam() <__main__.Lorem object at 0x7ff5078bc710> Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'NoneType' object is not callable It seems that no, a property is not a callable attribute. So I remain dumbfounded as to why anyone would want a class to *both* be an enumerated type, *and* have callable attributes in its API. -- \ “It's dangerous to be right when the government is wrong.” | `\ —Francois Marie Arouet Voltaire | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list