Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

maybe not removed, but they certainly did make breaking changes to the language. here are some of the most obvious

python 2:

  print "foo"   # foo
  3 / 5         # 0
  apply         # <built-in function apply>
python 3:

  print "foo"  # SyntaxError: Missing parentheses in call to 'print'
  3 / 5        # 0.6
  apply        # NameError: name 'apply' is not defined


These are precisely the kind of changes one would make to a language if you wanted to cause as much pain as possible. (I say this as someone who has been paid to write a syntax-driven code rewriting tool to go from one language version to another.)


But at the same time, f-strings are soooo much better than the old way, or even .format().




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: