From 626cc9aefd92d88de4a34db14cd39dce7d17019e Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Sat, 27 Nov 2021 10:57:55 -0800 Subject: [PATCH] Do not let defs shadow built-ins. --- joy/library.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/joy/library.py b/joy/library.py index 1e29b88..f85c69e 100644 --- a/joy/library.py +++ b/joy/library.py @@ -201,9 +201,9 @@ class Def(object): if line.lstrip().startswith('#'): continue name, body = text_to_expression(line) -## if name not in dictionary: -## inscribe(class_(name, body), dictionary) - inscribe(class_(name, body), dictionary) + if name not in dictionary: + inscribe(class_(name, body), dictionary) +## inscribe(class_(name, body), dictionary) #