mirror of
https://github.com/ChronosX88/medved.git
synced 2024-11-22 14:42:19 +00:00
17 lines
367 B
Python
17 lines
367 B
Python
class Item(object):
|
|
"""Base class for item"""
|
|
def __init__(self, source):
|
|
self._item = {
|
|
'source': source,
|
|
'steps': {},
|
|
'data': {}
|
|
}
|
|
|
|
def set(self, key, value):
|
|
elem = self._item['data']
|
|
upd = {}
|
|
for x in key.split("."):
|
|
elem = elem.get(x, {})
|
|
upd[x] = {}
|
|
upd[0] = value
|
|
self._item['data'].update(upd) |