class Foo: def __init__(self): self.definition = Foo! def hi(): # Some other code here :) # Classes require an __init__ if you want to assign attributes. (self) defines what describes the attribs.