Default parameters

Rainer Deyke rainerd at eldwood.com
Sat Dec 20 02:30:10 EST 2003


Rainer Deyke wrote:
> def draw_pixel(x, y, color, surface=screen):
>   screen[y][x] = color

This should of course be:

def draw_pixel(x, y, color, surface=screen):
  surface[y][x] = color


-- 
Rainer Deyke - rainerd at eldwood.com - http://eldwood.com






More information about the Python-list mailing list