Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

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'

----------
nosy: +rhettinger

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33103>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to