From 957a721cd48d0d7b232954375a26b1caae12d1ee Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Sat, 26 Aug 2017 10:43:21 -0700 Subject: [PATCH] Remove _hy_anon_fn_N in favor of _hy_anon_var_N --- hy/compiler.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hy/compiler.py b/hy/compiler.py index db1de24..6892b96 100755 --- a/hy/compiler.py +++ b/hy/compiler.py @@ -380,7 +380,6 @@ class HyASTCompiler(object): def __init__(self, module_name): self.allow_builtins = module_name.startswith("hy.core") - self.anon_fn_count = 0 self.anon_var_count = 0 self.imports = defaultdict(set) self.module_name = module_name @@ -393,10 +392,6 @@ class HyASTCompiler(object): self.anon_var_count += 1 return "_hy_anon_var_%s" % self.anon_var_count - def get_anon_fn(self): - self.anon_fn_count += 1 - return "_hy_anon_fn_%d" % self.anon_fn_count - def update_imports(self, result): """Retrieve the imports from the result object""" for mod in result.imports: @@ -1947,7 +1942,7 @@ class HyASTCompiler(object): if not body.stmts: body += asty.Pass(expression) - name = self.get_anon_fn() + name = self.get_anon_var() ret += asty.FunctionDef(expression, name=name,