When defining a class Foo, or function Bar, I get:
>>> import MethodType
>>> type(Foo)
classobj
>>> type(Bar)
function
>>> type(MethodType)
type
How do I define a class/function myself, so that its type is "type"?
You didn't inherit from object
when defining your Foo
class:
class Foo(object):
...