Don't know what is broke in your code, but to get around that extra comma thing use a list [] instead of a tuple () and you wont need any extra commas. Just FYI.
Don't know what is broke in your code, but to get around that extra comma thing use a list [] instead of a tuple () and you wont need any extra commas. Just FYI.
That's true, although tuples are a little more memory-effecient than lists, although in this case it would be unnoticably small.
Actually, your post drew me to the net to look at when one should consider using a tuple vs. a list, and the main idea I recieved was that in this situation, a list would probably be preferred. The idea of the tuple is that it would be immutable and in a specific order, whose sequence is relevant to the actual data (using a tuple of floats for coordinates makes sense, since the ith entry means something specific, whereas using a tuple of ints for just a collection of ints, even if it's a constant list that will never change, should be more a list).
Somewhere down the line, though, people (like me) got it into their head that the main reason for using tuples over lists was that tuples are simply immutable lists, and so I guess that's why I wrote it as a tuple.
Sorry to get back so late, but I've been swamped with schoolwork.
Apparently it works fine now in my game using the Civ4Utils file, so I guess I'm moving on to other things now. Thanks for the help!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.