Python Inner Method