(define (fastfkn x)
(case x
;; Lists
- ((append) (L 'pylist-apbpend!))
+ ((append) (L 'pylist-append!))
((count) (L 'pylist-count!))
((extend) (L 'pylist-extend!))
((index) (L 'pylist-index))
#:use-module (language python exceptions)
#:use-module (language python yield)
#:use-module (language python for)
+ #:use-module (language python try)
#:use-module (language python exceptions)
#:export (to-list pylist-ref pylist-set! pylist-append!))
((ref o '__listset__) n val))
;;APPEND
-(define-method (pylist-append! (o <py-list>) n val)
+(define-method (pylist-append! (o <py-list>) val)
(let* ((n (slot-ref o 'n))
(vec (slot-ref o 'vec))
(N (vector-length vec)))
(lp (+ i 1)))))
(vector-set! vec2 n val)
(slot-set! o 'vec vec2)))
- (slot-set! o 'n (+ n 1))))
+ (slot-set! o 'n (+ n 1))
+ (values)))
(define-method (pylist-append! o n)
(raise 'NotSupportedOP '__append__))
#:use-module (oop goops)
#:use-module (ice-9 control)
#:use-module (ice-9 match)
- #:export (raise try))
+ #:replace (raise)
+ #:export (try))
(define-syntax-rule (aif it p x y) (let ((it p)) (if it x y)))
(define raise
(case-lambda
- (() (raise Exception))
((x . l)
(if (pyclass? x)
(throw 'python (apply x l))
- (apply throw 'python x l)))))
+ (apply throw 'python x l)))
+
+ (() (raise Exception))))