MCPcopy 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
5def spam(b=[]):
6 return b
7
8a = spam()
9print(a)

Callers 1

example.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected