Python 个具有其他含义的运算符(例如打印人字形)

Python operators with other meanings (like the print chevron)

SO 上有很多关于 Python 的 print chevron 的问题,它使用与移位运算符之一相同的标记将 print 的输出发送到除标准输出:

print >> sys.stderr, "foo"

来自one of the answers

The >> token is not actually an operator here; it's part of the syntax of the print statement, as documented here.

Python2 中是否还有其他运算符也执行非运算符功能? Python 3(其中打印的人字形消失了)怎么样?

grammar, only >>, * (positional expansion), and ** (keyword expansion) have non-operator meanings. Python 3.x (as of 3.4.x) retains the last two, and adds none. Python 3.5 will add 所示,矩阵乘法运算符 (@) 及其扩充赋值 (@=)。