Skip to content

Commit 42f3f0d

Browse files
committed
replace dict merge operator
1 parent acb6c0e commit 42f3f0d

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/mash/shell/ast/set_definition.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ def run(self, prev_result='', shell: BaseShell = None, lazy=False):
5858
return f'{{ {self.items} | {self.condition} }}'
5959

6060
result = list(self.apply(items, shell))
61-
# result = self.parse_result(result)
62-
# shell.env[LAST_RESULTS] = result
63-
64-
# a = ['\n'.join((str(i) for i in c)) for c in result]
65-
# return ['\n'.join((str(i) for i in c)) for c in result]
66-
# return '\n'.join(str(i) for i in range(len(result)))
6761
shell._save_result(result)
6862
return ''
6963

@@ -100,5 +94,6 @@ def apply(self, data: dict, shell: BaseShell = None):
10094
def merge(dicts: list) -> {}:
10195
result = {}
10296
for entry in dicts:
103-
result |= entry
97+
for k, v in entry.items():
98+
result[k] = v
10499
return result

0 commit comments

Comments
 (0)