Fix some more dict.get/dict.values stuff

This commit is contained in:
Dave Halter
2018-02-02 18:24:18 +01:00
parent 8028138e8c
commit fe0e41e9d6
4 changed files with 19 additions and 8 deletions

View File

@@ -204,6 +204,9 @@ g
dic2 = {'asdf': 3, 'b': 'str'}
#? int()
dic2['asdf']
# TODO for now get doesn't work properly when used with a literal.
#? None
dic2.get('asdf')
# string literal
#? int()
@@ -256,6 +259,17 @@ for x in {1: 3.0, '': 1j}:
#? int() str()
x
#? ['__iter__']
dict().values().__iter__
d = dict(a=3, b='')
#? int() str()
d.values()[0]
#? int()
d['a']
#? int() None
d.get('a')
# -----------------
# with variable as index
# -----------------

View File

@@ -35,12 +35,6 @@ next(open(''))
#? ['__itemsize__']
tuple.__itemsize__
#? ['__iter__']
dict().values().__iter__
#? int()
dict(a=3).values()[0]
# -----------------
# type() calls with one parameter
# -----------------