hi guyz,
i'm a Python user (not so long) , anyway i've read some stuff about lua .
i've written function like this
def pair(dic = {} ):
return dic.keys(), dic.values()
a dictionary is a parameter to the pair function .
to use it like this :
dic = {1 : "Slackware", 2 : "Windows XP SP2"}
>>> for x, y in pair(dic):
print x, y
anyway , it works fine with the dic but doesn't work with a dictionary like this :
dic2 ={"Operating System" : "Version", "Slackware": "11", "Ms Windows": "XP SP2"}
it produce this error : ValueError: too many values to unpack
i tried to use x, y in dic2.keys(), dic2.values() , and it still the same problem .
what do you think ?