On Wed, Apr 25, 2018 at 7:12 PM, Jacco van Dorp <j.van.d...@deonet.nl> wrote: > Pycharm doesn't execute your code - it scans it. It wont know what you > store on a function object.
How does it currently know what type something is? If you define something using an enum, how is PyCharm going to know what the members of that enum are? > Forgive me if I misunderstand you, but aren't you really just trying > to use those strings as enum members when you define a function like > "takes one of these strings as argument" ? Because as far as I know, > except from some fluff, that's exactly what enums are and are intended > for - a unique set of keys that all have special meaning. That's *one of* the things you can do with an enum. There are many other features of enumerations, and I'm trying to boil your idea down to its most compact form. You don't need all the power of Enum - you just want to be able to list off the valid options. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/