[IronPython] Getting an error while Passing Dictionary to a function

saurabh rawat rawatsaurabh at yahoo.co.in
Mon Oct 18 06:41:17 CEST 2010


HI Jeff, 
I have replaced the code for function call with the function code itself at that place , as it was a small function it will not matter much whether i call it or not..I know thats bad to skip the error by following this usual practice(replacing function call by function codes line at that place)..anyways thanks for the conversation Jeff, I will get back to you with full details when i encounter it again..
Rgds, 
Saurabh

--- On Fri, 15/10/10, Jeff Hardy <jdhardy at gmail.com> wrote:

From: Jeff Hardy <jdhardy at gmail.com>
Subject: Re: [IronPython] Getting an error while Passing Dictionary to a function
To: "Discussion of IronPython" <users at lists.ironpython.com>
Date: Friday, 15 October, 2010, 9:30 PM

Can you show the exact code used to call func? Is it being called
inside the class (i.e. from another member of the same class) or from
outside the class?

- Jeff

On Thu, Oct 14, 2010 at 10:35 PM, saurabh rawat
<rawatsaurabh at yahoo.co.in> wrote:
>
>
>           HI Jeff,
> Its an instance method of a class..Dont think/Even tried passing self to it .Still R&D ing on it..!!
> Saurabh
>
>
>                " The ultimate test of a relationship is to disagree but to hold hands..............."
>
>
>
> --- On Thu, 14/10/10, Jeff Hardy <jdhardy at gmail.com> wrote:
>
> From: Jeff Hardy <jdhardy at gmail.com>
> Subject: Re: [IronPython] Getting an error while Passing Dictionary to a function
> To: "Discussion of IronPython" <users at lists.ironpython.com>
> Date: Thursday, 14 October, 2010, 8:19 PM
>
> Hi Saurabh,
> Is Func() an instance method of a class, or is it a static function?
> - Jeff
>
> On Thu, Oct 14, 2010 at 7:48 AM, saurabh rawat <rawatsaurabh at yahoo.co.in> wrote:
> >
> > I Am trying to pass a dictionary element to a function but even though the function takes 3 arguments , it is showing error as ERROR: Func() takes exactly 4 arguments (3 given).
> > Why is it happening.is there a problem in Dictionary Porting from .NET. to IronPython
> >
> >  public struct callCounters
> >         {
> >             public double callReceivedTimer;
> >             public double callDialledTimer;
> >             public double callAllTimer;
> >             public double callLifeTimer;
> >         }
> >
> > callValue = Dictionary[DateTime, callCounters]()
> >
> > prototype for Func()
> >
> > void func(string casename, DateTime time, Dictionary <<DateTime>,<user defined Structure>)
> >
> > Function call
> >
> > func(casename, time, callValue )
> >
> > ERROR: Func() takes exactly 4 arguments (3 given).
> >
> >
> > Plz assist.
> > Rgds,
> > Saurabh
> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> >
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20101018/92be4590/attachment.html>


More information about the Ironpython-users mailing list