Message314125
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' |
|
Date |
User |
Action |
Args |
2018-03-20 01:12:25 | rhettinger | set | recipients:
+ rhettinger, serhiy.storchaka, amjad ben hedhili |
2018-03-20 01:12:25 | rhettinger | set | messageid: <1521508345.15.0.467229070634.issue33103@psf.upfronthosting.co.za> |
2018-03-20 01:12:25 | rhettinger | link | issue33103 messages |
2018-03-20 01:12:24 | rhettinger | create | |
|