diff options
Diffstat (limited to 'modules/language/python/string')
-rw-r--r-- | modules/language/python/string | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/modules/language/python/string b/modules/language/python/string new file mode 100644 index 0000000..7d275bf --- /dev/null +++ b/modules/language/python/string @@ -0,0 +1,147 @@ +compile.scm: ((append) (L 'pylist-append!)) +compile.scm: ((count) (L 'pylist-count)) +compile.scm: ((extend) (L 'pylist-extend!)) +compile.scm: ((index) (L 'pylist-index)) +compile.scm: ((pop) (L 'pylist-pop!)) +compile.scm: ((insert) (L 'pylist-insert!)) +compile.scm: ((remove) (L 'pylist-remove!)) +compile.scm: ((reverse) (L 'pylist-reverse!)) +compile.scm: ((sort) (L 'pylist-sort!)) +compile.scm: ((__delitem__) (L 'pylist-delete!)) +compile.scm: ((__delslice__) (L 'pylist-delslice)) +compile.scm: ((__setitem__) (L 'pylist-set!)) +compile.scm: `(,(L 'pylist-ref) ,e ,(exp vs n))) +compile.scm: `(,(L 'pylist-slice) ,e +compile.scm: ,(gen-sel vs e `(,(L 'pylist-append!) ,l ,(exp vs x))) +compile.scm: ,(gen-sel vs e `(,(L 'pylist-set!) ,dict ,(exp vs k) ,(exp vs v))) +compile.scm: `(,(L 'pylist-set!) ,dict ,(exp vs k) ,(exp vs v))) +compile.scm: (ref-x (pylist-ref v x) . l)) +compile.scm: (ref-x (pylist-slice v . x) . l)))) +compile.scm: (pylist-delete! v x)) +compile.scm: (pylist-subset! v x ... pylist-null)))) +compile.scm: (pylist-set! v n val)) +compile.scm: (pylist-subset! v x ... val)))) +dict.scm:(define-method (pylist-ref (o <hashtable>) x) +dict.scm:(define-method (pylist-ref (o <py-hashtable>) x) +dict.scm:(define-method (pylist-delete! (o <hashtable>) k) +dict.scm:(define-method (pylist-delete! (o <py-hashtable>) k) +dict.scm:(define-method (pylist-pop! (o <hashtable>) k . l) +dict.scm:(define-method (pylist-pop! (o <py-hashtable>) k . l) +dict.scm:(define-method (pylist-set! (o <hashtable>) key val) +dict.scm:(define-method (pylist-set! (o <py-hashtable>) key val) +dict.scm: (pylist-set! h k newval) +dict.scm: (pylist-set! o k (apply py-get o k l))) +dict.scm: (pylist-set! o k (apply py-get o k l)))) +dict.scm: (pylist-set! o k v))) +dict.scm: (pylist-set! o k v)))) +dir.scm: (pylist-append! l k)) +dir.scm: (f (lambda (k v) (pylist-append! h k #t)))) +dir.scm: (hash-for-each (lambda (k v) (pylist-append! l k)) h) +dir.scm: (pylist-sort! l) +dir.scm: (f (lambda (k v) (pylist-append! h k #t)))) +dir.scm: (hash-for-each (lambda (k v) (pylist-append! l k)) h) +dir.scm: (pylist-sort! l) +dir.scm: (pylist-append! l k)) +dir.scm: (f (lambda (k.v) (pylist-append! h (car k.v) #t)))) +dir.scm: (vhash-for-each (lambda (k v) (pylist-append! l k)) h) +dir.scm: (pylist-sort! l) +dir.scm: (f (lambda (k.v) (pylist-append! h (car k.v) #t)))) +dir.scm: (vhash-for-each (lambda (k v) (pylist-append! l k)) h) +dir.scm: (pylist-sort! l) +dir.scm:(define-method (dir (o <pylist> )) pylist-listing) +expr.scm: (list-in x y)) +expr.scm: (to-py (list-in x y))) +list.scm: pylist-ref pylist-set! pylist-append! +list.scm: pylist-slice pylist-subset! pylist-reverse! +list.scm: pylist-pop! pylist-count pylist-extend! len in +list.scm: pylist-insert! pylist-remove! pylist-sort! +list.scm: pylist-index pylist-null pylist-delete! +list.scm: pylist pylist-listing)) +list.scm:(define-method (pylist-delete! (o <py-list>) k) +list.scm: (pylist-subset! o k (+ k 1) None pylist-null))) +list.scm:(define-method (pylist-delete! (o <p>) k) +list.scm:(define pylist-null +list.scm:(define-method (pylist-ref (o <py-list>) nin) +list.scm:(define-method (pylist-ref (o <pair>) n) +list.scm: (list-ref o n)) +list.scm:(define-method (pylist-ref (o <vector>) n) +list.scm:(define-method (pylist-ref (o <p>) n) +list.scm:(define-method (pylist-set! (o <py-list>) nin val) +list.scm:(define-method (pylist-set! (o <pair>) n val) +list.scm: (list-set! o n val)) +list.scm:(define-method (pylist-set! (o <vector>) n val) +list.scm:(define-method (pylist-set! (o <p>) n val) +list.scm:(define-method (pylist-slice (o <p>) n1 n2 n3) +list.scm:(define-method (pylist-slice (o <py-list>) n1 n2 n3) +list.scm:(define-method (pylist-slice (o <string>) n1 n2 n3) +list.scm: (list->string +list.scm: (pylist-slice (to-pylist o) n1 n2 n3)))) +list.scm:(define-method (pylist-slice (o <pair>) n1 n2 n3) +list.scm: (pylist-slice (to-pylist o) n1 n2 n3))) +list.scm:(define-method (pylist-slice (o <vector>) n1 n2 n3) +list.scm: (list->vector +list.scm: (pylist-slice (to-pylist o) n1 n2 n3)))) +list.scm:(define-method (pylist-subset! (o <p>) n1 n2 n3 val) +list.scm:(define-method (pylist-subset! (o <py-list>) n1 n2 n3 val) +list.scm:(define-method (pylist-append! (o <py-list>) val) +list.scm:(define-method (pylist-append! o n) +list.scm:(define-method (pylist-append! (o <p>) n . l) +list.scm:(define-method (pylist-reverse! (o <py-list>)) +list.scm:(define-method (pylist-reverse! (o <p>) . l) +list.scm:(define-method (pylist-pop! (o <py-list>)) +list.scm:(define-method (pylist-pop! (o <p>) . l) +list.scm:(define-method (pylist-count (o <py-list>) q) +list.scm:(define-method (pylist-count (s <string>) q) +list.scm:(define-method (pylist-count (l <pair>) q) +list.scm:(define-method (pylist-count (o <p>) . l) +list.scm:(define-method (pylist-extend! (o <py-list>) iter) +list.scm: (pylist-append! o x))) +list.scm:(define-method (pylist-extend! (o <p>) . l) +list.scm:(define-class <py-list-iter> (<py-list>) i) +list.scm: (let ((out (make <py-list-iter>))) +list.scm:(define-method (wrap-in (o <py-list-iter>)) o) +list.scm: (list->string (list ret))) +list.scm:(define-method (next (o <py-list-iter>)) +list.scm:(define-method (pylist-insert! (o <py-list>) i val) +list.scm: (pylist-append! o v))) +list.scm:(define-method (pylist-insert! (o <p>) . l) (apply (ref o 'insert) l)) +list.scm:(define-method (pylist-remove! (o <py-list>) val) +list.scm: (pylist-subset! o i (+ i 1) 1 '()) +list.scm:(define-method (pylist-remove! (o <p>) . l) (apply (ref o 'remove) l)) +list.scm:(define-method (pylist-sort! (o <py-list>) ) +list.scm: (pylist-set! o i (car l)) +list.scm:(define-method (pylist-sort! (o <p>) . l) (apply (ref o 'sort) l)) +list.scm:(define-method (pylist-index (o <py-list>) val . l) +list.scm:(define-method (pylist-index (o <string>) val . l) +list.scm:(define-method (pylist-index (o <pair>) val . l) +list.scm:(define-method (pylist-index (o <p>) . l) (apply (ref o 'index) l)) +list.scm: (for-each (lambda (x) (pylist-append! self x)) x)))) +list.scm:(define pylist-listing +list.scm:;(pylist-sort! pylist-listing) +set.scm: (pylist-set! d y #t))) +set.scm: (call-with-values (lambda () (pylist-pop! (slot-ref self 'dict))) +set.scm: (pylist-set! (slot-ref self 'dict) k #t))) +set.scm: (pylist-delete! r x))) +set.scm: (pylist-delete! r x))) +set.scm: (pylist-delete! r (car l)) +set.scm: (pylist-delete! r (car dels)) +set.scm: (pylist-delete! r (car dels)) +set.scm: (pylist-delete! r x))))) +set.scm: (pylist-set! r k #t)) +set.scm: (pylist-set! r k #t)) +string.scm: (list->string (reverse r)))))) +string.scm: (lp l (cons "~a" r) (cons (list-ref args (string->number x)) u) i)) +string.scm: (lp l (cons "~a" r) (cons (list-ref args i) u) (+ i 1))) +string.scm: (pylist-slice s 0 width) +string.scm: (pylist-slice s (- width) (len s)) +string.scm: (list (pylist-slice s 0 i) sep (pylist-slice s (+ i m) n)) +string.scm: (pylist-slice s (+ i m) n)) +string.scm: (pylist-slice s 0 i))) +string.scm: (lp (list-ref l 2) (cons (car l) r)))))) +string.scm: (- n (apply pylist-index (string-reverse s) l) 1))) +string.scm: (pylist-slice s old (+ i 1) 1) +string.scm: (pylist-slice s old i 1) +string.scm: (list->string +string.scm: (if (string-contains d (list->string (list ch))) +string.scm: (pylist-slice w 0 k 1)))))) +string.scm: (w (pk (pylist-slice s 0 n 1)))) |