我在查看python 2.7.10中的dis模块代码,47行有一些我不理解的奇怪语法:
引发typeerror,\
我想知道',\‘代码是做什么的?
发布于 2015-10-19 01:47:05
\是line continuation字符。它的意思是“这个语句继续到下一行”。
如果您的代码看起来像这样,
raise Typeerror, \
"expected string, got tuple"它的行为与
raise Typeerror, "expected string, got tuple"https://stackoverflow.com/questions/33201175
复制相似问题