fpom / snakes

SNAKES is the Net Algebra Kit for Editors and Simulators
https://snakes.ibisc.univ-evry.fr
Other
88 stars 29 forks source link

Test error: SyntaxError on astpy25 #31

Closed cargaji closed 11 months ago

cargaji commented 1 year ago

Hi again (for the last time),

The tests ran some code on the file astpy25.py, which seems to have an old-style raise statement. The following patch should fix it:

--- ./snakes/lang/astpy25.py
+++ ./snakes/lang/astpy25.py
@@ -16,7 +16,7 @@ for name, cls in inspect.getmembers(_ast
         class _Ast (cls, AST) :
             def __init__ (self, *larg, **karg) :
                 if len(larg) > 0 and len(larg) != len(self._fields) :
-                    raise TypeError, ("%s constructor takes either 0 or "
+                    raise TypeError("%s constructor takes either 0 or "
                                       "%u positional arguments"
                                       % (self.__class__.__name__,
                                          len(self._fields)))
fpom commented 11 months ago

Hi, thanks for your fixes, I've included all three in SNAKES and released a new version. Unfortunately, I'm on other projects and have very little time to update SNAKES which now has a lot of outdated code.