OSDN Git Service

Ah, Symbols.
authorSimon Forman <sforman@hushmail.com>
Wed, 11 Jul 2018 14:12:14 +0000 (07:12 -0700)
committerSimon Forman <sforman@hushmail.com>
Wed, 11 Jul 2018 14:12:14 +0000 (07:12 -0700)
joy/utils/types.py

index a1c0e1a..26779c3 100644 (file)
@@ -120,7 +120,8 @@ def delabel(f, seen=None, c=None):
     if not isinstance(f, tuple):
         try:
             seen[f] = f.__class__(c[f.prefix] + 1)
-        except TypeError:  # FunctionJoyTypes break this.
+        except (TypeError,  # FunctionJoyTypes break this.
+                AttributeError):  # Symbol
             seen[f] = f
         else:
             c[f.prefix] += 1