defcon
defcon copied to clipboard
LayerSet does not behave like a dict
According to the documentation:
This object behaves like a dict.
>>> isinstance(dcf.layers, defcon.LayerSet)
True
>>> dcf.layers.keys()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'LayerSet' object has no attribute 'keys'
>>> dcf.layers.values()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'LayerSet' object has no attribute 'values'
>>> dcf.layers.items()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'LayerSet' object has no attribute 'items'
Got it. Will look at.
My guess is that I copied and pasted that documentation line. I'd just remove it rather than adding keys, items, etc.