mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #968 from ynput/enhancement/804-make-publishattributevalues-behave-like-dict-when-iterating
Create Attribute values: Implemented iter
This commit is contained in:
commit
f11fba0a14
1 changed files with 4 additions and 0 deletions
|
|
@ -132,6 +132,10 @@ class AttributeValues:
|
||||||
def __contains__(self, key):
|
def __contains__(self, key):
|
||||||
return key in self._attr_defs_by_key
|
return key in self._attr_defs_by_key
|
||||||
|
|
||||||
|
def __iter__(self):
|
||||||
|
for key in self._attr_defs_by_key:
|
||||||
|
yield key
|
||||||
|
|
||||||
def get(self, key, default=None):
|
def get(self, key, default=None):
|
||||||
if key in self._attr_defs_by_key:
|
if key in self._attr_defs_by_key:
|
||||||
return self[key]
|
return self[key]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue