Bug in Python Interpreter?
a guest Jul 11th, 2018 64 in 108 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- #!/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