[New-bugs-announce] [issue33103] Syntax to get multiple items from an iterable

amjad ben hedhili report at bugs.python.org
Mon Mar 19 09:36:19 EDT 2018


New submission from amjad ben hedhili <amjadbenhedhili at gmail.com>:

It will be much of improvement for readability to write:

my_list = ["John", "Richard", "Alice", 1, True, 2.1, "End"]
a, b, c = my_list[1, 3, -1]

instead of:

my_list = ["John", "Richard", "Alice", 1, True, 2.1, "End"]
a, b, c = my_list[1], my_list[3], my_list[-1]

----------
messages: 314095
nosy: amjad ben hedhili
priority: normal
severity: normal
status: open
title: Syntax to get multiple items from an iterable
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33103>
_______________________________________


More information about the New-bugs-announce mailing list