daily pastebin goal
28%
SHARE
TWEET

Bug in Python Interpreter?

a guest Jul 11th, 2018 64 in 289 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python3
  2. global foo
  3. foo = [1, 2, 3]
  4. def func(bar):
  5.     pass
  6. print(repr(foo)) # Prints '[1, 2, 3]'.
  7. foo = func(foo)
  8. print(repr(foo)) # Prints 'None'.
  9. # Is this a bug, or intended behavior?
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top