[Python-ideas] Yielding from the command line

Paul Tagliamonte paultag at gmail.com
Fri Sep 12 17:10:09 CEST 2014


On Fri, Sep 12, 2014 at 08:01:35AM -0700, Guido van Rossum wrote:
>    While it may be possible to build "yield from" into a custom
>    read-eval-print loop (REPL), that's tricky because the built-in REPL in
>    written in C. the quickest way to success is definitely the helper
>    function shown in the first response.

While true, you can extend the REPL in Python by extending
code.InteractiveConsole and using its `.interact` method.

Sounds like a neat third party extension. I'd use it.


Cheers,
  Paul

-- 
:wq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140912/f686ff50/attachment.sig>


More information about the Python-ideas mailing list