This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients georg.brandl, ncoghlan, terry.reedy
Date 2009-07-18.13:48:53
SpamBayes Score 0.0017200562
Marked as misclassified No
Message-id <1247924935.25.0.665989584376.issue6507@psf.upfronthosting.co.za>
In-reply-to
Content
As per Georg's suggestion, a better approach would look like:

from dis import dis
def dis_str(source):
  try:
    c = compile(source, '', 'eval')
  except SyntaxError:
    c = compile(source, '', 'exec')
  return dis(c)
History
Date User Action Args
2009-07-18 13:48:55ncoghlansetrecipients: + ncoghlan, georg.brandl, terry.reedy
2009-07-18 13:48:55ncoghlansetmessageid: <1247924935.25.0.665989584376.issue6507@psf.upfronthosting.co.za>
2009-07-18 13:48:53ncoghlanlinkissue6507 messages
2009-07-18 13:48:53ncoghlancreate