Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz/python-cookbook
/ spam
Function
spam
src/7/functions_with_default_arguments/example.py:5–6 ·
view source on GitHub ↗
(b=[])
Source
from the content-addressed store, hash-verified
3
# (a) Dangers of using a mutable default argument
4
5
def
spam(b=[]):
6
return
b
7
8
a = spam()
9
print(a)
Callers
1
example.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected