this post was submitted on 11 Dec 2023
1137 points (98.9% liked)

Programmer Humor

32710 readers
155 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 17 points 1 year ago (2 children)

If you have a variable called exit you've overwritten the function in that scope, and won't be able to execute it.

e.g.

>>> exit=1
>>> exit()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'int' object is not callable
>>>
[โ€“] peopleproblems 5 points 1 year ago

wow it does do that. cool