Comment

FutureNerd

Casting in C (or C++ or Java) is that (int) x syntax. It sometimes means converting, sometimes means reinterpreting the bytes, sometimes both! E.g., in C:
<pre>
char x = -1;
long y = (unsigned char) x; // y = 255
long z = (unsigned short) x; // z = 65535 (!)</pre>

The Python int(x) syntax more clearly implies "convert" to my eyes.

Parent comment

mypalmike

Casting does mean converting. In both C and Python, casting from float to int is very much a conversion. It takes the original fp number, which is generally represented internally as an IEEE 754 floating point value, and converts it to an twos completment integer representing the floor of the value. The new value has a completely different representation than the original. In other words, it is a different object. Your example of casting pointers doesn't modify anything because a pointer is a pointer, so no underlying representation needs to be changed for the semantics of conversion to take place.