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

This innocent (albeit convoluted) piece of code used to segfault on pypy 7.3.1 . It is now fixed in this release! It was a bug in their JIT.

  def main(n):
    # Note: exact value of n and prints are significant, don't change
    a = [0] * n
    for _ in range(n):
        pos = -1
        for i in range(n):
            if i > 0:
                print(a[i - 1], end="")
                pos = i
        print(a[pos], _, n)
  main(191)



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

Search: