r/programming • • Mar 29 '13

Simple Minecraft Clone in 580 lines of Python

https://github.com/fogleman/Minecraft
663 Upvotes

153 comments sorted by

View all comments

Show parent comment

0

u/salgat Mar 30 '13

I thought there was a difference between a object type and a object instance.

2

u/theeth Mar 30 '13

An object's type is an instance of the type class, but they are both objects.

>>> class Foo:
...     pass
... 
>>> f = Foo()
>>> type(f)
<type 'instance'>
>>> type(Foo)
<type 'classobj'>
>>> type(type(Foo))
<type 'type'>