[Bf-python] Consistency issue

Stephen Swaney sswaney at swbell.net
Thu Oct 2 03:31:02 CEST 2003


Willian Padovani Germano wrote:
> 
> (...) 
> From: "Michel Selten" <michel.s at home.nl>
> (...)
> > 3 - Update the setLocation() function to both accept a tuple and a
> >     list of values. 
> > (...)
> > My personal preference would go to option 3.
> 
> I like this one, too.  And you're right, once we "unwrap" a pytuple, it
> isn't available for another parsing.  A simple way to solve this:  first
> check the size of the PyObject *args parameter.  If the function expects
> [f,f,f] or f, f, f, it's simple to decide: the size of 'args' will be either
> 1 or 3.

/me smacks forehead and says 'Doh!'.  That's an amazingly obvious
solution now that you point it out, Willian.  And simple!

I vote for this one.

-- 
Stephen Swaney			
sswaney at swbell.net



More information about the Bf-python mailing list