Implement itemgetter partially

This commit is contained in:
Dave Halter committed 2018-09-04 00:01:55 +02:00
1 parent 35ce54630e
commit 38176ae7e6
4 files changed
+31 -11

No files matched your search

+14 -1
View File
@@ -247,12 +247,25 @@ with contextlib.closing('asd') as string:
import operator
f = operator.itemgetter([1])
f = operator.itemgetter(1)
#? float()
f([1.0])
#? str()
f([1, ''])
g = operator.itemgetter(1, 2)
x1, x2 = g([1, 1.0, ''])
#? float()
x1
#? float()
x2
x1, x2 = g([1, ''])
#? str()
x1
#? int() str()
x2
# -----------------
# shlex
# -----------------