Font.render() raises a TypeError if background is None

Issue #49 resolved
René Dudfield created an issue

== John, 2010-05-25 20:25:21 -0700

{{{ The documentation says that Font.render()'s background argument defaults to None, however if None actually used it raises an exception:

TypeError: Invalid background RGBA argument

This became problematic when I wanted to extend the default Font class with my own render function. I can't simply accept a background argument with a default value of None and pass it on to the original renderer, if the background is None then the argument has to be excluded completely. }}}

== Marco Chieppa, 2010-07-01 08:01:17 -0700

{{{ Created attachment 36 proposed patch font render for enable background=None

based on revision 2827 }}}

Attachments: [[| pygame_font.c_patch]]

== Marco Chieppa, 2010-07-01 16:32:41 -0700

{{{ Created attachment 37 test for attachment 36 }}}

Attachments: [[|]]

Comments (2)

  1. Log in to comment