Python中既有强制类型转换也有强迫同型,通常使用更多的是前者(“显式优于隐式”)。
Python contains a mixture of casts and coercions, with a usual preference for the former (" explicit is better than implicit ").
解释类型转换的概念以及隐式和显式转换的不同。
Explains the concept of type conversion and the distinction between implicit and explicit conversion.
显式构造函数不能参与隐式转换。
An explicit constructor cannot take part in implicit conversions.
应用推荐