Message199372
Nice.
My only complain is the dis.dis example. We don't have to use redirect_stdout context manager.
+ # How to capture disassembly to a string
+
+ import dis
+ import io
+
+ f = io.StringIO()
+ with redirect_stdout(f):
+ dis.dis('x**2 - y**2')
+ s = f.getvalue()
dis.dis supports file object natively. We can do this instead:
dis.dis('x**2 - y**2', file=f) |
|
Date |
User |
Action |
Args |
2013-10-10 08:44:00 | vajrasky | set | recipients:
+ vajrasky, barry, rhettinger, ncoghlan, belopolsky, pitrou, vstinner, ezio.melotti, alex, nikratio, python-dev, Marc.Abramowitz |
2013-10-10 08:44:00 | vajrasky | set | messageid: <1381394640.57.0.243158062383.issue15805@psf.upfronthosting.co.za> |
2013-10-10 08:44:00 | vajrasky | link | issue15805 messages |
2013-10-10 08:44:00 | vajrasky | create | |
|