summaryrefslogtreecommitdiff
path: root/modules/oop
diff options
context:
space:
mode:
authorStefan Israelsson Tampe <stefan.itampe@gmail.com>2017-09-12 01:14:19 +0200
committerStefan Israelsson Tampe <stefan.itampe@gmail.com>2017-09-12 01:14:19 +0200
commit1643965084f92dc45b0831fde7d8baf2acfb87f9 (patch)
tree9ede2e44f3628e87817e7fe950066d78af6947f8 /modules/oop
parentc83974cc585d93ec2798e34c7f3db6c4f9481ef5 (diff)
Better python semantics is now followed
Diffstat (limited to 'modules/oop')
-rw-r--r--modules/oop/pf-objects.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/oop/pf-objects.scm b/modules/oop/pf-objects.scm
index 29d8fc9..515af74 100644
--- a/modules/oop/pf-objects.scm
+++ b/modules/oop/pf-objects.scm
@@ -10,7 +10,7 @@
def-p-class mk-p-class make-p-class
def-pyf-class mk-pyf-class make-pyf-class
def-py-class mk-py-class make-py-class
- StopIteration
+ StopIteration GeneratorExit RuntimeError
Exception))
#|
@@ -593,6 +593,9 @@ explicitly tell it to not update etc.
(error "not a class")))
(define StopIteration 'StopIteration)
+(define GeneratorExit 'GeneratorExit)
+(define RuntimeError 'RuntimeError)
+
(define-method (next (o <p>))
(catch StopIteration
(lambda () ((ref o '__next__)))
@@ -631,7 +634,7 @@ explicitly tell it to not update etc.
(lambda (cl)
(testex py tag cl l)))
(else
- #f))
+ (eq? tag ex)))
#f))