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/059215.html below:

[Python-Dev] a quit that actually quits

[Python-Dev] a quit that actually quits [Python-Dev] a quit that actually quitsReinhold Birkenfeld reinhold-birkenfeld-nospam at wolke7.net
Wed Dec 28 20:44:52 CET 2005
Fredrik Lundh wrote:
> Walter Dörwald wrote:
> 
>> We have sys.displayhook and sys.excepthook. Why not add a sys.inputhook?
>> sys.inputhook gets passed each line entered and may return True if it has
>> processed the line inself and False if normal handling of the input should be
>> done. This allows special treatment of "quit", "exit", "help" /.../
> 
> so how would such a hook deal with the
> 
>     >>> def exit():
>     ...     pass
>     >>> exit
> 
> case ?

In the inputhook one would have to check for "exit" being defined at
interpreter level.

Reinhold

-- 
Mail address is perfectly valid!

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