From 178e58f8bd43d6959909e09205de41c184c0a208 Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Tue, 14 Feb 2023 10:07:26 -0800 Subject: [PATCH] =?UTF-8?q?Load=20embedded=20defs.txt,=20remove=20?= =?UTF-8?q?=E2=89=A1=20stuff.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I like that ≡ but I also like consistency. --- implementations/Python/joy.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/implementations/Python/joy.py b/implementations/Python/joy.py index 6277707..3798c21 100755 --- a/implementations/Python/joy.py +++ b/implementations/Python/joy.py @@ -59,7 +59,7 @@ from traceback import print_exc import operator -DEFS = ''' +DEFS = '''\ '''.splitlines() @@ -1065,9 +1065,7 @@ class Def(object): definitions (lines with '≡' in them) into the dictionary. ''' for line in stream: - if '≡' not in line: - continue - name, body = text_to_expression(line.replace('≡', '')) + name, body = text_to_expression(line) if name not in dictionary: inscribe(class_(name, body), dictionary) @@ -2540,7 +2538,7 @@ def unswons(stack): def default_defs(dictionary): - Def.load_definitions(__doc__.splitlines(), dictionary) + Def.load_definitions(DEFS, dictionary) if __name__ == '__main__':