console.log(p) // ok
p = new Math.z()console.log(p) // TypeError: function round() { [native code] } is not a constructor
因此,我可以在自己的函数中使用new,但不能在Math.r
我目前正在将一些Python2代码移植到Python3,并且遇到了这个小gem:if v < 1:现在,在Python3中它抛出一个错误:
TypeError:'<' not supported between instances of 'tuple' and 'int'.这很好,因为您不能比较元组和整数。但在Python2中,这是允许<e