[Python-Dev] More Python command-line features

Fred L. Drake, Jr. Fred L. Drake, Jr." <fdrake@acm.org
Wed, 8 Sep 1999 09:35:28 -0400 (EDT)

Greg Ward writes:
 > Regarding -O, it would also be nice to have a higher-level way to find
 > out what optimization level the current interpreter is running under.
 > Currently, as I understand it, there's no way to predict whether

  I agree.  In fact, I'd even be willing to add support to compile the 
parse-trees produced by the parser module with or without optimization 
(pick your favorite level); that would be easy with the current
  I didn't add this earlier because Guido objected, saying that the
internal optimization flag could change.  That would require that the
parser module implementation change accordingly.  I don't think that
would be a huge problem, other than for my having to send Guido a
pre-forma gripe that he'd given me more work to do two days before a
release.  ;-)
  So, should <ast-object>.compile() accept an optional optimization
level, with the default being to use the "current" setting?


Fred L. Drake, Jr.	     <fdrake@acm.org>
Corporation for National Research Initiatives