coercion

What's the difference between casting and coercion in Python?

What's the difference between casting and coercion in Python? Question: In the Python documentation and on mailing lists I see that values are sometimes "cast", and sometimes "coerced". Asked By: Justin R. || Source Answers: I think “casting” shouldn’t be used for Python; there are only type conversion, but no casts (in the C sense). …

Total answers: 2