mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-27 23:51:26 +08:00
Fix some more dict.get/dict.values stuff
This commit is contained in:
@@ -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
|
||||
# -----------------
|
||||
|
||||
@@ -35,12 +35,6 @@ next(open(''))
|
||||
#? ['__itemsize__']
|
||||
tuple.__itemsize__
|
||||
|
||||
#? ['__iter__']
|
||||
dict().values().__iter__
|
||||
|
||||
#? int()
|
||||
dict(a=3).values()[0]
|
||||
|
||||
# -----------------
|
||||
# type() calls with one parameter
|
||||
# -----------------
|
||||
|
||||
Reference in New Issue
Block a user