If x is not a Python int object, it has to define an __index__() method ... The bool class is a subclass of int (see Numeric Types — int, float, complex).
確定! 回上一頁