what is the difference between x.type and type(x) in Python? <p>Consider the following lines </p> <pre><code>import theano.tensor as T x = T.dscalar('x') y = T.dscalar('y') z = x+y </code></pre> <p>And then,</p> <pre><code>In [15]: type(x) Out[15]: theano.tensor.var.TensorVariable </code></pre> <p>while,</p> <pre><code>In [16]: x.type Out[16]: TensorType(float64, scalar) </code></pre> <p>Why type(x) and x.type give two different pieces of information ? What information is conveyed by them ?</p> <p>I also see that referring to <a href="http://deeplearning.net/software/theano/tutorial/adding.html" rel="nofollow">Theano tutorial</a> ,</p> <pre><code>&gt;&gt;&gt; type(x) &lt;class 'theano.tensor.basic.TensorVariable'&gt; &gt;&gt;&gt; x.type TensorType(float64, scalar) </code></pre> <p>Why type(x) output is different in my case ? Are these caused by version specific implementation differences and what is signified by this difference ?</p>