Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Bug in Python Interpreter?

a guest Jul 11th, 2018 64 in 207 days
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  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