Why does the "dis" module print?

Jeremy Fincher tweedgeezer at hotmail.com
Mon Aug 12 17:46:37 CEST 2002


It seems that it would be a lot easier to pull information out of the
output of the dis.dis function if, instead of printing its results, it
returned a list of the disassembled bytecodes.  Printing bytecodes
from a returned list is trivial; making a list from the printed
bytecodes is much less so.  Why does dis print instead of returning a
list of bytecodes?

Thanks,
Jeremy



More information about the Python-list mailing list