On 19 July 2016 at 01:41, Guido van Rossum guido@python.org wrote:
Honestly my own preference would be to use UPPER_CASE, emphasizing the const-ness. CapWords is really only used for classes, which are entirely different beasts. And lower_case is for methods and variables. I think it's useful to emphasize that an enum is neither.
I haven't used enum much outside the standard library, but my C/C++ background would push me towards CAP_WORDS since they're constants.
That also has the virtue of making the standard library uses no longer a special case - they're just CAP_WORDS-because-they're-constants, rather than CAP_WORDS-because-they're-defined-by-a-third-party-C-API
Cheers, Nick.