A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-December/059150.html below:

[Python-Dev] a quit that actually quits

[Python-Dev] a quit that actually quits [Python-Dev] a quit that actually quitsGerhard Häring gh at ghaering.de
Wed Dec 28 00:52:54 CET 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ka-Ping Yee wrote:
> [...]
>     (b) If more handholding seems like a good idea, then:
> 
>         class ExitHatch:
>             def __call__(self): sys.exit()
>             def __repr__(self): return '<Type "exit()" to exit Python.>'
>         __builtins__.exit = __builtins__.quit = ExitHatch()

That looks like a good compromise to me.

- -- Gerhard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDsdPWdIO4ozGCH14RAsTyAKCW5mwCJ/cN+UbKICufXwmDIX9/tgCfQLJa
LaEL4a4pV7Jhnh3ry/b+CrU=
=/FQl
-----END PGP SIGNATURE-----
More information about the Python-Dev mailing list

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