really good support for list/set conversions

This commit is contained in:
David Halter
2012-08-10 17:21:14 +02:00
parent e0ebc0e3ac
commit 9b80dab77b
2 changed files with 36 additions and 9 deletions

View File

@@ -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]