Current Results
in gpython
>>>>d_list= {'a' : 1, 'b' : 2}
>>>>fork, vind_list.items("hi"):
>>>>print(k,':',v)
a : 1b : 2in python
>>>>d_list= {'a' : 1, 'b' : 2}
>>>>fork, vind_list.items("hi"):
>>>>print(k,':',v)
Traceback (mostrecentcalllast):
File"test.py", line2, in<module>fork, vind_list.items("hi"):
TypeError: items() takesnoarguments (1given) | funcinit() { |
| StringDictType.Dict["items"] =MustNewMethod("items", func(selfObject, argsTuple) (Object, error) { |
| sMap:=self.(StringDict) |
| o:=make([]Object, 0, len(sMap)) |
| fork, v:=rangesMap { |
| o=append(o, Tuple{String(k), v}) |
| } |
| returnNewIterator(o), nil |
| }, 0, "items() -> list of D's (key, value) pairs, as 2-tuples") |
| } |
I think we should add an error to this part of the code.
Current Results
in gpython
in python
gpython/py/dict.go
Lines 30 to 39 in af17d7d
I think we should add an error to this part of the code.