Terry J. Reedy <tjre...@udel.edu> added the comment:

Just today, someone posted the result of dis.dis('somebytes') and did not 
notice the error because dis blithely disassembles bytes as bytecodes, even in 
3.x. (The person actually dissed a 2.x string).

>>> from dis import dis
>>> dis(b'cat')
          0 DUP_TOPX        29793

It is a natural thing to do, so I hope this is put in 3.2. 

Since the undocumented 'disassemble_string' now disassembles bytes, I think it 
should be renamed '_disassemble_bytes' instead of '_disassemble_string'. This 
would accord with the general effort to remove 2.x fossils from 3.x.

Aside from that, it looks ready, from a reading review, to apply and test: doc 
addition, added tests, new function and else case, and rename.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6507>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to