Re: [Pyobjc-dev] Calling function with variable number of arguments?
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2004-04-27 19:52:42
|
On 27-apr-04, at 21:19, Pierce T.Wetter III wrote: > > So this line is giving me an error: > > qual= ObjectModel.EOQualifier.qualifierWithQualifierFormat_('fund = %@ > and date >= %@',fund,now60) > > TypeError: Need 1 arguments, got 3 > > (1.1 b2 downloaded about 15 minutes ago) > > Presumably because qualifierWithQualifierFormat takes a variable > number of arguments. > > Is there some sort of voodoo I can do to get this to work? The easiest solution is to do the formatting on the python side: qual= ObjectModel.EOQualifier.qualifierWithQualifierFormat_('fund = %s and date >= %s'%(fund,now60)) It is possible to write C code that would allow you to pass in a variable number of arguments, but you would have to implement most of the format-string parsing in the wrapper. Ronald -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 |