[Zope-dev] Bug in ExternalMethods?

Tim Hicks tim@sitefusion.co.uk
Thu, 19 Dec 2002 14:13:20 -0000 (GMT)


I think I've found a bug in ExternalMethod, but I don't know if it's
already been fixed or not.

Basically, the call signature of ExternalMethods seems to get mixed up
sometimes.  I'm running Zope 2.5.1 on Linux.

Here's a small demonstration of the bug:

--test.py--
def test(self, a_string, an_int, a_named_arg=1):
    """bug provoking?"""
    template =  """a_string = %s; type(a_string) -> %s\n
an_int = %s; type(an_int) -> %s\n
a_named_arg = %s; type(a_named_arg) -> %s"""
    return template % (a_string, type(a_string), an_int, type(an_int),
a_named_arg, type(a_named_arg))
----

--Script (Python)--
return container.test('tim', 10, a_named_arg=(1,1))
return container.test('tim', 10, (1,1))
----

You can see the dodgy behaviour by switching between the two test() calls
in the Script (Python).


tim