[Python-ideas] Spelling of Assignment Expressions PEP 572 (was post #4)

Kirill Balunov kirillbalunov at gmail.com
Sun Apr 15 10:22:09 EDT 2018


2018-04-15 17:17 GMT+03:00 Kirill Balunov <kirillbalunov at gmail.com>:

>
>
> for item in iter(read_next_item, None):
>     items.append(item)
>     print(r'%d/%d' % (i, len(items)), end='\r')
>
>
> With kind regards,
> -gdg
>

Oh, I forgot about `i`:

for item in iter(read_next_item, None):
    i += 1
    items.append(item)
    print(r'%d/%d' % (i, len(items)), end='\r')

With kind regards,
-gdg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180415/0242e147/attachment.html>


More information about the Python-ideas mailing list