Bug in Python Interpreter?
a guest Jul 11th, 2018 64 in 207 days
- #!/usr/bin/env python3
- global foo
- foo = [1, 2, 3]
- def func(bar):
- print(repr(foo)) # Prints '[1, 2, 3]'.
- foo = func(foo)
- print(repr(foo)) # Prints 'None'.
- # Is this a bug, or intended behavior?
RAW Paste Data