What exactly is a python variable?
Ned Batchelder
ned at nedbatchelder.com
Thu Nov 17 20:52:10 EST 2016
On Thursday, November 17, 2016 at 8:35:15 PM UTC-5, BartC wrote:
> That Py2's dis.dis() accepts a string argument but treats it as compiled
> byte-code sounds like a bug. Unless it's a feature.
In Python 2, plain-old strings are byte-strings, so there's no way for
dis.dis to distinguish between a string literal full of code, and a
byte-string full of bytecode.
So it's not a bug, and it also is not a feature. It just is.
--Ned.
More information about the Python-list
mailing list