This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients amjad ben hedhili, rhettinger, serhiy.storchaka
Date 2018-03-20.01:12:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521508345.15.0.467229070634.issue33103@psf.upfronthosting.co.za>
In-reply-to
Content
FWIW, there is already a way to do this but it involves the extra step of applying map() to a bound method:

>>> my_list = ["John", "Richard", "Alice", 1, True, 2.1, "End"]
>>> a, b, c = map(my_list.__getitem__, [1, 3, -1])
>>> a
'Richard'
>>> b
1
>>> c
'End'
History
Date User Action Args
2018-03-20 01:12:25rhettingersetrecipients: + rhettinger, serhiy.storchaka, amjad ben hedhili
2018-03-20 01:12:25rhettingersetmessageid: <1521508345.15.0.467229070634.issue33103@psf.upfronthosting.co.za>
2018-03-20 01:12:25rhettingerlinkissue33103 messages
2018-03-20 01:12:24rhettingercreate