Skip to content

Commit

Permalink
Update dangerous_default_arg_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
srijan-deepsource authored Mar 2, 2020
1 parent dc25438 commit 372e91e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dangerous_default_arg_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ def some_func(arg1, arg2, arg3=[1, 2, 3], arg4=None, arg5={1,2}):
def some_other_func(arg=[1,2,3]):
"""Nested function to ensure indentation doesn't get messed up"""

def another_nested_function(danger=[]):
x = [1,2,3]; y={1, 2, 3}; z={'a': 1, 'b': 2}; t=(1, 2, 3)
def another_nested_function(danger_one=x, danger_two=y, danger_three=z, xyz=None, safe_four=t):
"""Another deeply nested function."""
return danger
return

return arg

Expand Down

0 comments on commit 372e91e

Please sign in to comment.