better int
authorStefan Israelsson Tampe <stefan.itampe@gmail.com>
Mon, 14 May 2018 20:36:44 +0000 (22:36 +0200)
committerStefan Israelsson Tampe <stefan.itampe@gmail.com>
Mon, 14 May 2018 20:36:44 +0000 (22:36 +0200)
modules/language/python/module/builtins.scm [new file with mode: 0644]
modules/language/python/module/signal.scm [new file with mode: 0644]
modules/language/python/number.scm

diff --git a/modules/language/python/module/builtins.scm b/modules/language/python/module/builtins.scm
new file mode 100644 (file)
index 0000000..5b54a07
--- /dev/null
@@ -0,0 +1,20 @@
+(define-module (language python module builtins)
+  #:use-module (language python module python))
+
+(define-syntax re-export-all
+  (syntax-rules ()
+    [(_ iface)
+     (module-for-each 
+      (lambda (name . l)
+        (module-re-export! (current-module) ((@ (guile) list) name)))
+      (resolve-interface 'iface))]
+    [(_ iface _ li)
+     (let ((l 'li))
+       (module-for-each 
+        (lambda (name . l)        
+          (if (not (member name l))
+              (module-re-export! (current-module) ((@ (guile) list) name))))
+        (resolve-interface 'iface)))]))
+
+(re-export-all (language python module python))
+  
diff --git a/modules/language/python/module/signal.scm b/modules/language/python/module/signal.scm
new file mode 100644 (file)
index 0000000..f0d4426
--- /dev/null
@@ -0,0 +1,5 @@
+(define-module (language python module signal)
+  #:use-module (language python module enum)
+  #:export ())
+
+  
index db8a0c8d783e33aa1cba2afef6a520586043967e..6e45fd21e22c4b4d85631bee4c2ef6835da4244a 100644 (file)
 (define-method (write (o <py-int>) . l)
   (apply write (slot-ref o 'x) l))
 
-(define-python-class int (<py-int>)
+(define-python-class int (<py> <py-int>)
   (define __init__
     (letrec ((__init__
               (case-lambda
              ret
              #f)))))
 
-(define-python-class float (<py-float>)
+(define-python-class float (<py> <py-float>)
   (define __init__
     (case-lambda
       ((self n)
 
 (name-object float)
 
-(define-python-class py-complex (<py-complex>)
+(define-python-class py-complex (<py> <py-complex>)
   (define __init__
     (case-lambda
       ((self n)