diff options
author | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2017-10-06 12:37:08 +0200 |
---|---|---|
committer | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2017-10-06 12:37:08 +0200 |
commit | 7ddc6ae87f08cec346a1c5ca234286b5454c64b4 (patch) | |
tree | 64eac37bf570e5f63f505fcd4628b338dae1744f /modules/language/python/set.scm | |
parent | 40bdb5e60820bd559eaed121d77bbb6972a68ea2 (diff) |
small fixes
Diffstat (limited to 'modules/language/python/set.scm')
-rw-r--r-- | modules/language/python/set.scm | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/modules/language/python/set.scm b/modules/language/python/set.scm index f0e2956..d69b7c9 100644 --- a/modules/language/python/set.scm +++ b/modules/language/python/set.scm @@ -20,16 +20,10 @@ (slot-set! self 'dict (make-py-hashtable))) ((self x) (let ((d (make-py-hashtable))) - (slot-set! self 'dict (make-py-hashtable)) - (cond - ((or (is-a? x <py-list>) (pair? x) (string? x)) - (for ((y : x)) () - (pylist-set! d y #t))) - ((is-a? x <py-hashtable>) - (slot-set! self 'dict x)) - (else - (raise TypeError))))))) - + (slot-set! self 'dict d) + (for ((y : x)) () + (pylist-set! d y #t)))))) + (define pop (lambda (self) (call-with-values (lambda () (pylist-pop! (slot-ref self 'dict))) |