Fredrik Lundh wrote: > sourceforge just went off the air, so I'm posting this patch here, in order > to distract you all from Christian's deque thread. > > this silly little patch changes the behaviour of the interpreter so that "quit" > and "exit" actually exits the interpreter. it does this by installing a custom > excepthook that looks for NameErrors at the top level, in interactive mode > only. What is wrong with something like this: >>> class Quitter: ... def __repr__(self): raise SystemExit ... >>> exit = quit = Quitter() It could optionally check for top level too, of course. Reinhold -- Mail address is perfectly valid!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4