Commits

desmaj committed cae3b6a

added support for the BitXor and FloorDiv nodes; bumped the version

  • Participants
  • Parent commits 727c0ed

Comments (0)

Files changed (3)

File astkit/render.py

     def render_BitOr(self, node):
         return "|"
     
+    def render_BitXor(self, node):
+        return "^"
+    
     def render_BlankLine(self, node):
         self.emit("\n")
     
     def render_Expression(self, node):
         self.emit(self._render(node.body))
     
+    def render_FloorDiv(self, node):
+        return '//'
+    
     def render_For(self, node):
         source = ("for %s in %s:\n" % (self._render(node.target),
                                        self._render(node.iter)))

File astkit/test/test_rendering.py

              (ast.BitOr(),
               '|'),
 
+             (ast.BitXor(),
+              '^'),
+             
              (ast.BoolOp(op=ast.And(), values=[ast.Name(id="a"),
                                                ast.Name(id="b"),
                                                ast.Name(id="c"),
              (ast.Eq(),
               '=='),
 
+             (ast.FloorDiv(),
+              '//'),
+             
              (ast.GeneratorExp(elt=ast.Name(id="frog"),
                                generators=standard_comprehensions),
               ("( frog\n"
 from setuptools import setup, find_packages
 import sys, os
 
-version = '0.4'
+version = '0.4.1'
 
 setup(name='astkit',
       version=version,