gilbert189 — 7/7/2023, 2:07:22 PM

more mutability weirdness I would like to abuse later

def test(foo = {}):
	def this():
		return foo
	def that():
		return foo
	return this, that

this_one  , that_one   = test({1: ["foo"]})
this_other, that_other = test({2: ["bar"]})
this_one().update(this_other())
this_one()[2].append("baz")
print(that_one(), that_other())
♥ 2 ↩ 0 💬 0 comments

comments

no comments