- fix #190 for py2.4
- other 2.4 ism
diff --git a/CHANGES b/CHANGES
index d43cbd3..6cb9a7c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -21,7 +21,8 @@
   [ticket:207]
 
 - [bug] Fixed Py3K bug where a "lambda" expression was not
-  interpreted correctly within a template tag.  [ticket:190]
+  interpreted correctly within a template tag; also
+  fixed in Py2.4.  [ticket:190]
 
 0.8.1
 - [bug] Changed setup.py to skip installing markupsafe
diff --git a/mako/pyparser.py b/mako/pyparser.py
index b305707..5499076 100644
--- a/mako/pyparser.py
+++ b/mako/pyparser.py
@@ -540,6 +540,27 @@
                     self.visit(a)
             self.buf.write(')')
 
+        def visitLambda(self, node, *args):
+            self.buf.write('lambda ')
+
+            argnames = list(node.argnames)
+
+            kw = arg = None
+            if node.kwargs > 0:
+                kw = argnames.pop(-1)
+            if node.varargs > 0:
+                arg = argnames.pop(-1)
+
+            if arg:
+                argnames.append("*%s" % arg)
+            if kw:
+                argnames.append("**%s" % kw)
+
+            self.buf.write(", ".join(argnames))
+
+            self.buf.write(': ')
+            self.visit(node.code)
+
 
     class walker(visitor.ASTVisitor):
 
diff --git a/test/test_ast.py b/test/test_ast.py
index 008bd55..be93751 100644
--- a/test/test_ast.py
+++ b/test/test_ast.py
@@ -316,7 +316,8 @@
                         "repr({'x':-1})", "repr(((1,2,3), (4,5,6)))",
                         "repr(1 and 2 and 3 and 4)",
                         "repr(True and False or 55)",
-                        "repr(lambda x, y: x+y)",
+                        "repr(lambda x, y: (x + y))",
+                        "repr(lambda *arg, **kw: arg, kw)",
                         "repr(1 & 2 | 3)",
                         "repr(3//5)",
                         "repr(3^5)",
@@ -327,9 +328,12 @@
             local_dict = {}
             astnode = pyparser.parse(code)
             newcode = pyparser.ExpressionGenerator(astnode).value()
-            eq_(eval(code, local_dict),
-                eval(newcode, local_dict)
-            )
+            if "lambda" in code:
+                eq_(code, newcode)
+            else:
+                eq_(eval(code, local_dict),
+                    eval(newcode, local_dict)
+                )
 
 
 
diff --git a/test/test_runtime.py b/test/test_runtime.py
index af7dbee..80b97ce 100644
--- a/test/test_runtime.py
+++ b/test/test_runtime.py
@@ -2,7 +2,7 @@
 """
 from mako import runtime
 import unittest
-from . import eq_
+from test import eq_
 
 class ContextTest(unittest.TestCase):
     def test_locals_kwargs(self):