defcon icon indicating copy to clipboard operation
defcon copied to clipboard

LayerSet does not behave like a dict

Open simoncozens opened this issue 5 years ago • 2 comments

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'

simoncozens avatar Oct 26 '20 08:10 simoncozens

Got it. Will look at.

benkiel avatar Dec 17 '20 19:12 benkiel

My guess is that I copied and pasted that documentation line. I'd just remove it rather than adding keys, items, etc.

typesupply avatar Jan 25 '21 19:01 typesupply