@@ -1684,6 +1684,9 @@ def visit_Call(self, node):
16841684 else :
16851685 return '__jsdict_pop(%s)' % self .visit (anode .value )
16861686
1687+ elif anode .attr == 'split' and not args :
1688+ return '__split_method(%s)' % self .visit (anode .value )
1689+
16871690 else :
16881691 a = ',' .join (args )
16891692 if node .keywords :
@@ -1722,8 +1725,6 @@ def visit_Call(self, node):
17221725 else :
17231726 return '%s(%s)' % ( self .visit (node .func ), ',' .join (args ) )
17241727
1725- #a = ','.join(args)
1726- #return '%s(%s)' %( self.visit(node.func), a )
17271728
17281729 elif isinstance (node .func , Name ) and node .func .id in self ._generator_functions :
17291730 name = self .visit (node .func )
@@ -1788,13 +1789,6 @@ def visit_Call(self, node):
17881789 writer .append ('var(%s, %s)' % (args_name , kwargs_name ))
17891790 self .identifier += 1
17901791
1791- #if name in ('list', 'tuple'):
1792- # if args:
1793- # writer.append( '%s = %s[...]' % (args_name, args)) ## test this
1794- # else:
1795- # writer.append( '%s = []' %args_name )
1796- #else:
1797- # writer.append('%s = JSArray(%s)' % (args_name, args))
17981792 writer .append ('%s = [%s]' % (args_name , args ))
17991793
18001794 if node .starargs :
@@ -1813,18 +1807,8 @@ def visit_Call(self, node):
18131807
18141808 #######################################
18151809
1816- #if name in self._func_typedefs:
1817- # if args and kwargs:
1818- # return '%s(%s, %s)' %(args_name, kwargs_name)
1819- # elif args:
1820- # return '%s(%s, {})' %args_name
1821- # elif kwargs:
1822- # return '%s([], %s)' %kwargs_name
1823- # else:
1824- # return '%s()' %name
1825-
18261810 ## special method calls ##
1827- if isinstance (node .func , ast .Attribute ) and node .func .attr in ('get' , 'keys' , 'values' , 'pop' , 'items' ) and not self ._with_lua :
1811+ if isinstance (node .func , ast .Attribute ) and node .func .attr in ('get' , 'keys' , 'values' , 'pop' , 'items' , 'split' ) and not self ._with_lua :
18281812 anode = node .func
18291813 if anode .attr == 'get' :
18301814 if args :
@@ -1847,6 +1831,9 @@ def visit_Call(self, node):
18471831 else :
18481832 return '__jsdict_pop(%s)' % self .visit (anode .value )
18491833
1834+ elif anode .attr == 'split' and not args :
1835+ return '__split_method(%s)' % self .visit (anode .value )
1836+
18501837 else :
18511838 return '%s(%s)' % ( self .visit (node .func ), args )
18521839
0 commit comments