Can someone explain why the x below can act as a function float()? Basically I dont understand what means? is this a internal function or implicit object ?
>>> x=type(0.0)
>>> x
<type 'float'>
>>> x('9.823')
9.823
It's exactly the same as writing float('9.823'). In fact, you can easily see that as follows:
>>> type(0.0) is float
True
>>>
And you can use them in exactly the same way:
>>> float('9.823')
9.823
>>> type(0.0)('9.823')
9.823
>>>
It's just invokes the constructor for the float type.
You're setting the variable x to the type float. The command type() returns the type of whatever is inside the brackets. In your case, you provided the type command with a float and setting that return of float to your variable x.
x = float.x = floatand then callingx('0.823'). But never the less interesting, never thought of using the type object in junction with a function call : )