[Python-Dev] A minimal Python interpreter written in Python for experimenting with language changes

Steve Holden steve at holdenweb.com
Tue Feb 6 05:00:52 EST 2018


On Tue, Feb 6, 2018 at 3:40 AM, Steven D'Aprano <steve at pearwood.info> wrote:

> On Sat, Feb 03, 2018 at 11:45:15AM +0100, asrp wrote:
>
> ​[...]
>


> Here's a faked session showing the sort of thing I am referring to.
> (Note that this is just an example, not a proposal for a new language
> feature.)
>
> for x in [1, 2, 3]:
>     print(x)
> otherwise:
>     print("nothing there")
>
>
> prints 1, 2, 3.
>

​I think you meant

    for x in ([1, 2, 3], ):

​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20180206/03dc4881/attachment.html>


More information about the Python-Dev mailing list