diff options
author | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-04-15 22:29:50 +0200 |
---|---|---|
committer | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-04-15 22:29:50 +0200 |
commit | 77e4e51a919c50e2847527aaffe67e8e19b970ae (patch) | |
tree | 61a261e5b053da07493610b947fd8b51e1a8c2f4 /modules/language/python/set.scm | |
parent | 7c0c098b89dc33ad1018b6542def4e2d34ddd2a8 (diff) |
progressively imporoving the conformance with python3
Diffstat (limited to 'modules/language/python/set.scm')
-rw-r--r-- | modules/language/python/set.scm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/language/python/set.scm b/modules/language/python/set.scm index 5582d36..2f3b7cc 100644 --- a/modules/language/python/set.scm +++ b/modules/language/python/set.scm @@ -224,6 +224,22 @@ (t (slot-ref d 't))) (not (eq? miss (py-hash-ref t x miss)))))) + (define __and__ + (lambda (self op) + (intersection self op))) + + (define __or__ + (lambda (self op) + (union self op))) + + (define __sub__ + (lambda (self op) + (difference self op))) + + (define __xor__ + (lambda (self op) + (symmetric_difference self op))) + (define __eq__ (lambda (self x) (and |