Closed percurnicus closed 7 years ago
As pointed out in #23, in python3 items() returns an ItemsView object which is not subscriptable
items()
In [1]: import pvl In [2]: label = pvl.loads(""" ...: foo = bar ...: monty = python ...: """) In [3]: items = label.items() In [4]: items[0] --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-4-95f461411437> in <module>() ----> 1 items[0] TypeError: 'ItemsView' object does not support indexing
But we should get something similar to:
In [4]: items[0] Out [4]: ('foo', 'bar')
As pointed out in #23, in python3
items()
returns an ItemsView object which is not subscriptableBut we should get something similar to: