[Python-Dev] \code or \constant in tex markup
Fred L. Drake, Jr.
fdrake at acm.org
Thu May 10 15:27:34 CEST 2007
On Wednesday 09 May 2007, Neal Norwitz wrote:
> Which is correct?
\constant was introduced much more recently than \code (though it's not really
new anymore). The intent for \constant when it was introduced was that it be
used for names that were treated as constants in code (such as
string.ascii_letters or doctest.REPORT_NDIFF), not syntactic literals like 3
or "abc".
At the time, None, True, and False were just named values in the __builtin__
module. I don't think the support for None as a "real" constant should
change the status of the value as "just another named constant" other than in
the implementation details.
So I think \constant is right for all three; we just haven't gone back and
changed all the older instances of \code{None}, \code{True}, and
\code{False}. We've generally resisted that sort of blanket change, but
consistency is valuable too. Perhaps it's time to make the change across the
board.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
More information about the Python-Dev
mailing list