Python Beta exit infinity lopp

Problem description:
I found a bug (only in Python Beta Template). Basically an infinity exit loop. (and then the console literally says “Giving Up.” lol)

def this_never_existed(unreal_function):
  def wrapper(*args, **kwargs):
    exit('This function never existed lol')

  return wrapper

def greet(name):
  print(f'Hello, {name}!')


Expected behavior:
A single exit message

Actual behavior:

Steps to reproduce:

  1. Make Python (Beta) repl
  2. do the code above
  3. run repl

Bug appears at this link:


1 Like

I wouldn’t call this a bug. This is a much better improvement when compared to letting CPU power run out and Python crashing altogether.

Wait, edit: I reread your post, and its looping exit()? How is that even possible? That actually might be a bug, whether intended or not, that would easily break programs that migrated to it and used exit() within their code. (Hopefully this is what you mean lol)


I actually like this bug, because it’s dramatic and funny.

1 Like

Funny! I guess the Replit template keeps trying to recover or something.