com_addbyte

Carl Bray cbray at orchestream.com
Wed Nov 1 12:04:42 CET 2000


You could try using Arbitrary Argument Lists.

4.7.3 Arbitrary Argument Lists
Finally, the least frequently used option is to specify that a function can
be called with an arbitrary number of argu-ments.
These arguments will be wrapped up in a tuple. Before the variable number of
arguments, zero or more normal
arguments may occur.

def fprintf(file, format, *args):
    file.write(format % args)


<etsang at my-deja.com> wrote in message news:8tn1v7$3s2$1 at nnrp1.deja.com...
> Hi all,
>
> Since I am not entitled to display source code outside, I am not able
> to give the source code out. But here is something that I have found:
>
> there is a function which takes in more than 255 parameters, and once
> that number of parameters are reduced, Python does not complain anymore.
>
> So is there a way to get around that?
>
> Sample function declaration in issue:
> def func1(a,b,c,d[A,B,C,D], ..... 364 parameters):
>
> Can someone give me a sample on solution to this problem?
>
> Thanks a million.
>  PS: I am a newbie in Python.
>
>
> In article <8tks75$bau$1 at nnrp1.deja.com>,
>   Jeremy Hylton <jeremy at alum.mit.edu> wrote:
> >
> > > I currently have the following problem:
> > > Description:
> > > Python has the limit for either the number of arguments or size of
> the
> > > parameters.
> > >
> > > Try SILIB_IAM_MAO.py in ~isup/ctftest/si/problem directory.
> > > Try si_tc_S20/si_tc_S2005.py  as the test case.
> > >
> >
> > How can I try SILIB_IAM_MAO.py?  I don't have a copy of it.
> >
> > Several limits, e.g. length of source file, have been removed in
> Python
> > 2.0.  It's impossible to say whether your program is affected because
> > you haven't told us anything about it.
> >
> > Jeremy
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.





More information about the Python-list mailing list