Python Dynamically Add Attribute In Block