Easy Python class writing and type checking