Python: Add test case for .copy() as a copy step

This commit is contained in:
Taus
2024-02-22 13:01:03 +00:00
parent 7ce7b58ce0
commit 5125973f9b
2 changed files with 16 additions and 0 deletions

View File

@@ -216,3 +216,9 @@ def flow_from_within_deepcopy_fp():
def flow_through_deepcopy_fp(x=[]):
y = deepcopy(x)
y.append(1)
# Use of copy method:
def flow_through_copy_fp(x=[]):
y = x.copy()
y.append(1) #$ SPURIOUS: modification=y