[Tutor] A more Pythonic way to do this

Alan G alan.gauld at freenet.co.uk
Fri Jul 1 09:08:28 CEST 2005


>            enemyship_sprites.add(Enemy((cols*60)+20, (rows*40)+30),
level)

Check your parens... The closing one after 30 closes the constructor
list.
level is outside so you effectively have

sprites.add(Enemy(X,Y), level)

HTH,

Alan G.



More information about the Tutor mailing list