summaryrefslogtreecommitdiff
path: root/modules/language
diff options
context:
space:
mode:
Diffstat (limited to 'modules/language')
-rw-r--r--modules/language/python/module.scm21
1 files changed, 11 insertions, 10 deletions
diff --git a/modules/language/python/module.scm b/modules/language/python/module.scm
index 53aa1c2..ab963d1 100644
--- a/modules/language/python/module.scm
+++ b/modules/language/python/module.scm
@@ -138,16 +138,17 @@
(define __getattribute__
(lambda (self k)
(define (fail)
- (raise KeyError "getattr in Module"))
-
- (if (rawref self '_module)
- (let ((k (_k k))
- (m (_m self)))
- (let ((x (module-ref m k e)))
- (if (eq? e x)
- (fail)
- x)))
- (fail))))
+ (raise (KeyError "getattr in Module")))
+ (aif it (rawref self k)
+ it
+ (if (rawref self '_module)
+ (let ((k (_k k))
+ (m (_m self)))
+ (let ((x (module-ref m k e)))
+ (if (eq? e x)
+ (fail)
+ x)))
+ (fail)))))
(define __setattr__
(lambda (self k v)