equal
deleted
inserted
replaced
524 """) |
524 """) |
525 |
525 |
526 def insert(self, index, value): |
526 def insert(self, index, value): |
527 JS(""" var a = this.l; this.l=a.slice(0, index).concat(value, a.slice(index));""") |
527 JS(""" var a = this.l; this.l=a.slice(0, index).concat(value, a.slice(index));""") |
528 |
528 |
529 def pop(self, index = -1): |
529 def pop(self, index=-1): |
530 JS(""" |
530 JS(""" |
531 if (index<0) index = this.l.length + index; |
531 if (index<0) index = this.l.length + index; |
532 var a = this.l[index]; |
532 var a = this.l[index]; |
533 this.l.splice(index, 1); |
533 this.l.splice(index, 1); |
534 return a; |
534 return a; |
674 """) |
674 """) |
675 |
675 |
676 def insert(self, index, value): |
676 def insert(self, index, value): |
677 JS(""" var a = this.l; this.l=a.slice(0, index).concat(value, a.slice(index));""") |
677 JS(""" var a = this.l; this.l=a.slice(0, index).concat(value, a.slice(index));""") |
678 |
678 |
679 def pop(self, index = -1): |
679 def pop(self, index=-1): |
680 JS(""" |
680 JS(""" |
681 if (index<0) index = this.l.length + index; |
681 if (index<0) index = this.l.length + index; |
682 var a = this.l[index]; |
682 var a = this.l[index]; |
683 this.l.splice(index, 1); |
683 this.l.splice(index, 1); |
684 return a; |
684 return a; |