TypeError: Value() takes at most 2 arguments (3 given)
Max Barry
max at ford-consulting.com
Thu Jun 19 15:55:49 EDT 2003
Oops, there was a typo. You are right def foo() should be def foo(self). I
am still getting the TypeError. Any other suggestions.
Updated example:
class someclass:
def foo(self):
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
Thanks,
max
-----Original Message-----
From: python-list-admin at python.org
[mailto:python-list-admin at python.org]On Behalf Of vincent wehren
Sent: Thursday, June 19, 2003 12:06 PM
To: python-list at python.org
Subject: Re: TypeError: Value() takes at most 2 arguments (3 given)
"Max Barry" <max at ford-consulting.com> schrieb im Newsbeitrag
news:mailman.1056044255.14205.python-list at python.org...
> 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():
How's about:
def foo(self):
self.test(somevbobject)
Regards,
Vincent Wehren
> 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
>
>
>
>
>
--
http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list