[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Strange (uncommon) behaviour of Font.render()





Am 09.01.2011 23:29, schrieb Floris van Manen:
On Jan 9, 2011, at 23:08, Gregor Lingl wrote:
then try

text = font.render("Hello world!", 1, (255, 255, 0), background=None)

Is there any reason, why this could work differently?

Named arguments can be presented in any order.
If there are more optional arguments in between, you'd get incorrect assignments if you leave the name out
Yeah! You assume the docs to be incorrect.

But ...
... if in

font.render("Hello world!", 1, (255, 255, 0), None)

None would not be assigned to background but to something else, then background would have it's default value? So we had the same situation - concerning background - as in

font.render("Hello world!", 1, (255, 255, 0))

an that works fine. For me it remains a mystery
Regards, Gregor