First but not optimized version of AstFormatDict
This commit is contained in:
@@ -113,7 +113,8 @@ class Sheerka(Concept):
|
||||
self.methods_with_context = {"test_using_context"} # only the names, the method is defined in sheerka_methods
|
||||
self.sheerka_methods = {
|
||||
"test": SheerkaMethod(self.test, False),
|
||||
"test_using_context": SheerkaMethod(self.test_using_context, False)
|
||||
"test_using_context": SheerkaMethod(self.test_using_context, False),
|
||||
"test_dict": SheerkaMethod(self.test_dict, False)
|
||||
}
|
||||
self.sheerka_pipeables = {}
|
||||
|
||||
@@ -1028,6 +1029,20 @@ class Sheerka(Concept):
|
||||
# uncomment the following line to enable colors
|
||||
# logging.StreamHandler.emit = add_coloring_to_emit_ansi(logging.StreamHandler.emit)
|
||||
|
||||
def test_dict(self):
|
||||
bag2 = {
|
||||
"alpha": "value4",
|
||||
"beta": ["item1", "item2", "item3", ]
|
||||
}
|
||||
bag = {
|
||||
"a": "value1",
|
||||
"baba": "value2",
|
||||
"c": "value1",
|
||||
"de": ["item1", "item2", "item3", ],
|
||||
"e": bag2
|
||||
}
|
||||
return self.new(BuiltinConcepts.TO_DICT, body=bag)
|
||||
|
||||
|
||||
def to_profile():
|
||||
sheerka = Sheerka()
|
||||
|
||||
Reference in New Issue
Block a user