<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
On 05/25/2012 10:14 AM, Antoine Pitrou wrote:
<blockquote cite="mid:20120525191431.0623368c@pitrou.net"
type="cite">
<pre wrap="">On Fri, 25 May 2012 18:57:57 +0200
Georg Brandl <a class="moz-txt-link-rfc2396E" href="mailto:g.brandl@gmx.net"><g.brandl@gmx.net></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">This is probably minor, but wouldn't it make more sense to have those
constants uppercased? At least that's the general style we have in
the codebase for enum values.
</pre>
</blockquote>
<pre wrap="">
+1, this surprised me too.
</pre>
</blockquote>
<br>
FWIW I contributed the utime enum with the lowercase values. I
don't uppercase enum values as a rule.<br>
<br>
Uppercasing preprocessor macros is a good idea because they're not
safe. There are loads of ways they can produce unexpected
behavior. So if something funny is going on, and the code involves
some preprocessor slight-of-hand, those identifiers pop out at you
and you know to double-check them. But enum values are as safe as
houses. I think of them as equivalent to const ints, which I also
don't uppercase. There's no need to draw attention to them.<br>
<br>
There's nothing in PEP 7 either way about enum nomenclature. But
Benjamin has already uppercased these (and some other) enums, so I
suppose the community has spoken.<br>
<br>
<br>
<i>/arry</i><br>
</body>
</html>