Page 2 of 2

Posted: Sat Jul 21, 2012 12:18 am
by satoon101
Pretty sure explicitly getting a variable by using the correct method to get its correct type isn't against the nature of Python. This, in all honesty, is not up for discussion. It seems very code-lazy to me to expect to be able to use a dictionary type object to return the correct value. Simply use the given GetInt, GetFloat, GetString, etc... to get the correct value that you are looking for.

Satoon

Posted: Mon Sep 03, 2012 12:49 am
by XE_ManUp
Please keep in mind that anyone will be able to add the event functionality later. Most people that code will know the types that they are looking for and cast them as such. This, I believe, is why Mattie opted to simply return everything as a string. It is easy enough to change the type in Python if needed and required far too much legwork.

The resource file does declare the types that they "should" be, so it would be relatively painless to view this and declare for yourself. That's how we did it with the whole of GunGame. Another thought is that it can be detrimental to force the declared type. What if I "want" the userid to be a string because of the way my data table is laid out? Then I str() it, right? If someone wants something other than what it is, they are free to change it.

Posted: Sat Sep 13, 2014 5:56 pm
by BackRaw
I don't know if this discussion is still open, but I wanna say that it's good as it is right now, and it's working perfectly fine :D please don't change it :)