class f(object): def __init__(self, w, x=1, y=2, z=3): print w, x, y, z z='x' f('a') f('a', 3) f('a', 3, y='z')