Hacker News new | comments | show | ask | jobs | submit login

No idea what pypy does but cpython with the -O flag will.

  assert.py:
  a = 0
  def gadd(b):
      global a
      a = a + b
      return a
  assert gadd(1) == 1, 'a != 1'
  print a

  $python assert.py
  1
  $python -O assert.py
  0



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: