really good support for list/set conversions
This commit is contained in:
1 parent
e0ebc0e3ac
commit
9b80dab77b
2 files changed
+36
-9
No files matched your search
@@ -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