Stupid bug in python syntax