Commits

Anonymous committed 06ec9ee

BUG: Keyword should not be translated when adding to Namespace

Comments (0)

Files changed (1)

pypeg2/__init__.py

 
     def __setitem__(self, key, value):
         """x.__setitem__(i, y) <==> x[i]=y"""
-        value.name = Symbol(key)
+        if not isinstance(key, Symbol):
+            key = Symbol(key)
+        value.name = key
         if key:
-            name = Symbol(key)
+            name = key
         else:
             name = id(key)
         try: