This commit is contained in:
Erik Frojdh
2020-01-08 16:44:42 +01:00
parent 71b0ed271e
commit dac5ecd123
6 changed files with 108 additions and 32 deletions

View File

@ -30,6 +30,9 @@ def element_if_equal(mylist):
return mylist
def element(func):
"""
Wrapper to return either list or element
"""
@functools.wraps(func)
def wrapper(self, *args, **kwargs):
return element_if_equal(func(self, *args, **kwargs))