itsapi / pycraft

A Minecraft-inspired game for the terminal
GNU General Public License v2.0
197 stars 21 forks source link

default keyword for max() added in Python 3.4 #100

Closed geraintwhite closed 8 years ago

geraintwhite commented 8 years ago

https://docs.python.org/3/library/functions.html#max

Traceback (most recent call last):
  File "main.py", line 312, in <module>
    main()
  File "main.py", line 19, in main
    game(blocks, *ui.main())
  File "main.py", line 128, in game
    last_frame
  File "/home/pi/python/pycraft/render.py", line 64, in render_map
    pixel_out = calc_pixel(x, y, pixel, objects, blocks, bk_objects, sky_colour, lights, tick)
  File "/home/pi/python/pycraft/render.py", line 110, in calc_pixel
    bg = sky(x, y, tick, bk_objects, sky_colour, lights)
  File "/home/pi/python/pycraft/render.py", line 190, in sky
    light = max(light_levels, key=lambda l: l[2], default=sky_colour)
TypeError: max() got an unexpected keyword argument
olls commented 8 years ago

Well what version of Python are we aiming to support?