Use a var rather than throwing [0] everywhere.
Use the correct check for attribute existence.
PYTHON DOESN'T NEED SEMICOLONS AT THE END OF LINES
update spec-data