TypeError: Value() takes at most 2 arguments (3 given)

Max Barry max at ford-consulting.com
Thu Jun 19 13:36:45 EDT 2003


I am having problems calling a VB6 let property from a class in python.  I
get a TypeError: Value() takes at most 2 arguments (3 given).  I presume the
self is being passed as the 3rd argument.  Here is an example of the class:

class someclass:
    def foo():
	self.test(somevbobject)

    def test(self, Result):
        	Result.Value(1, 0)


This is the VB property that python calls:
Public Property Let Value(ByVal lngIndex As Long, ByVal sngNew As Single)
    ' Notice: presumed to be zero-based values
    msngValues(lngIndex + 1) = sngNew
End Property

Does anybody know how to resolve this problem?

Thanks in advance,
Max









More information about the Python-list mailing list