mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 07:14:48 +08:00
really good support for list/set conversions
This commit is contained in:
@@ -158,6 +158,22 @@ arr.extend("") # should ignore
|
||||
##? float() int()
|
||||
arr[0]
|
||||
|
||||
# -----------------
|
||||
# set/list initialized as functions
|
||||
# -----------------
|
||||
|
||||
st = set()
|
||||
st.add(1)
|
||||
|
||||
#? int()
|
||||
for s in st: s
|
||||
|
||||
lst = list()
|
||||
lst.append(1)
|
||||
|
||||
#? int()
|
||||
for i in lst: i
|
||||
|
||||
# -----------------
|
||||
# renames / type changes
|
||||
# -----------------
|
||||
@@ -174,5 +190,15 @@ lst = list(st)
|
||||
|
||||
lst.append('')
|
||||
|
||||
##? int() str()
|
||||
#? int() str()
|
||||
lst[0]
|
||||
|
||||
lst = [1]
|
||||
lst.append(1.0)
|
||||
s = set(lst)
|
||||
s.add("")
|
||||
lst = list(s)
|
||||
lst.append({})
|
||||
|
||||
#? dict() int() float() str()
|
||||
lst[0]
|
||||
|
||||
Reference in New Issue
Block a user