Me reading the first word of each sentence instead of the first letter
Me reading the first word of each sentence instead of the first letter
Knork/10
This image just unlocked a deep childhood memory or something like that, can’t tell because my brain can’t load it.
Well you can also pray for Israel to stop
For a second, I thought Lemmy had advertisements now.
Lol idk, but just saw that neostore is a “direct adaption of foxy-droid”
https://f-droid.org/en/packages/com.machiav3lli.fdroid/
Also supports automatic updates in the background
This is the code (Github link):
class Quitter(object):
def __init__(self, name, eof):
self.name = name
self.eof = eof
def __repr__(self):
return 'Use %s() or %s to exit' % (self.name, self.eof)
def __call__(self, code=None):
# Shells like IDLE catch the SystemExit, but listen when their
# stdin wrapper is closed.
try:
sys.stdin.close()
except:
pass
raise SystemExit(code)
What happens is that the python repl calls __repr__
automatically on each variable/statement that you type into the repl (except assignments e.g. x = 1
).
But this basically only happens in the repl. So “executing” only exit
wouldn’t work in a python script as it is not calling __repr__
automatically, so better you learn how to do it right than using just exit
in your python scripts and scratching your head why it works in the repl but not in your code.
Wdym?🤨