Signals.CTS looks better than "CTS". But Signals is not an enumeration, it is a class with specific fields. The requirement, as I heard, is that you do not need a separate enum language construct, as you can do things like you did in this question, or perhaps:
CTS, DSR, XXX, YYY, ZZZ = range(5)
If you have this in a signal module, you can import it as used in a similar way, for example, if signal == signals.CTS: This is used in several modules in the standard library, including the re and os modules.
source share