Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print x # does one thing
- print x, # does another
- x = "hello everybody"
- s = x.split(" ") # does what you would expect
- y = s.join(" ") # does NOT do what you would expect
- import re
- x = "The sky is red"
- r = re.compile("red")
- x.sub(r, "blue") # oops, that causes an error
- r.sub(x, "blue") # there, that should do it
- print x # prints "The sky is red" -- what!?
- y = r.sub(x, "blue") # maybe that will do it
- print y # nope, now it just prints "blue"
- referrer = "http://foobar.com"
- if override():
- referer = "overridden"
- print "Referrer: " + referrer
- # Do you see the bug?
- # There was a typo in a variable name.
- # No warning. No error.
- # Because you can't enforce variable predeclaration.
- int x = 0;
- x = 0
- def dog ():
- falkdfjlkdfj
- print "Hello Worldn"
- dog()
- time.sleep = 4
- time.sleep(4)
- try:
- prase(getUserInput())
- except:
- print 'You entered an invalid number.'
Add Comment
Please, Sign In to add comment