A method of an object is kept in a variable, and called through that variable.
class Builder:
def __init__(self):
self.parts = []
def add(self, s):
self.parts.append(s)
return len(self.parts)
b = Builder()
push = b.add
push("x")
push("y")
print(push("z"), "".join(b.parts), Builder().parts)
What does the program print?