2010-11-12, 23:22
jfcarroll Wrote:I have a dumb python question. You have a line in default.py that looks like this:
Code:w = GrooveClass("grooveshark.xml", __cwd__, "DefaultSkin", isXbox = __isXbox__)
... but isXbox is not a parameter of any __init__ method on GrooveClass (nor its parents). How is this working?
Well, actually it shouldn't work. As you say it's not a parameter that is defined by __init__() in GrooveClass. It should give an error. The reason it works, I suspect, is because the xbmcgui.WindowXML class is an extension module written in C++ which merely checks if if it gets enough arguments. Any excess arguments are simply ignored (I haven't checked the source to confirm, mind you).
The reason 'isXbox' is there is because I forgot to delete it when I switched to another initialization scheme. I'll commit the corrected code ;-)