Returning lists from python COM servers

Mark Hammond mhammond at skippinet.com.au
Fri Sep 6 21:31:02 EDT 2002


Olly Smith wrote:
> uhmmmmm, strangely enough, changing it to
> 
> ==
> return [tags,vals]
> ==
> 
> on the server side fixed it!
> 
> Now the question is: WHY!?

'cos some of the pythoncom code sucks.  Returning a tuple can trick the 
framework into thinking you are actually trying to return the *real* 
values, as well as the underlying CSCODE in the COM call.  Returning a 
list fixes this.  I need to look into this a little deeper, but fear b/w 
compatibility will screw me.

Mark.




More information about the Python-list mailing list