Consider the following:
class car:
pass
tesla=car()
When I do type(tesla)
, this gives __main__.car
, as I expect.
But if I have:
class car:
pass
tesla=car
then type(car)
gives type
.
From another post here on SO, it really shouldn't matter how I instantiate the class. But clearly as we see here, the type of the object is different. I am an absolute beginner to python, could you please let me know what is going on here.
Thanks!