Python Set Attribute In Function Start