python syntax fix