forked from VimPlug/jedi
frozenset is working now / further array conversion tests
This commit is contained in:
@@ -109,6 +109,18 @@ class set():
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
||||||
|
class frozenset():
|
||||||
|
def __init__(self, iterable=[]):
|
||||||
|
self.iterable = iterable
|
||||||
|
|
||||||
|
def __iter__(self):
|
||||||
|
for i in self.iterable:
|
||||||
|
yield i
|
||||||
|
|
||||||
|
def copy(self):
|
||||||
|
return self
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------
|
#--------------------------------------------------------
|
||||||
# basic types
|
# basic types
|
||||||
#--------------------------------------------------------
|
#--------------------------------------------------------
|
||||||
|
|||||||
@@ -187,8 +187,23 @@ GetItem("")[1]
|
|||||||
# conversions
|
# conversions
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|
||||||
|
a = [1, ""]
|
||||||
#? int() str()
|
#? int() str()
|
||||||
list([1,""])[1]
|
list(a)[1]
|
||||||
|
|
||||||
#? int() str()
|
#? int() str()
|
||||||
list(set([1,""]))[1]
|
list(a)[0]
|
||||||
|
|
||||||
|
#? int() str()
|
||||||
|
list(set(a))[1]
|
||||||
|
#? int() str()
|
||||||
|
list(list(set(a)))[1]
|
||||||
|
|
||||||
|
# does not yet work, because the recursion catching is not good enough (catches # to much)
|
||||||
|
##? int() str()
|
||||||
|
list(set(list(set(a))))[1]
|
||||||
|
##? int() str()
|
||||||
|
list(set(set(a)))[1]
|
||||||
|
|
||||||
|
#? int() str()
|
||||||
|
list(frozenset(a))[1]
|
||||||
|
|||||||
Reference in New Issue
Block a user