Discussion:
[python-win32] How pywin tells properties from function in COM?
Łukasz Jakubowski
2015-02-17 20:33:41 UTC
Permalink
Hi,

There is this entry in dynamic.py/_FlagAsMethod:

"Some objects do not correctly differentiate methods and properties,
leading to problems when calling these methods."

My question is: what actually makes a difference? Going through dynamic.py
and build.py it seems to me, that all is hidden behind pythoncom34.dll
containing mapping for dynamic.py/ALL_INVOKE_TYPES.
Something in COM Server - not a Python one - (one of IDispatch methods?)
must provide correct parameters - which method is it?

TIA & Regards,
Łukasz

---
Ta wiadomość została sprawdzona na obecność wirusów przez oprogramowanie antywirusowe Avast.
http://www.avast.com
Tim Roberts
2015-02-17 22:11:30 UTC
Permalink
Post by Łukasz Jakubowski
"Some objects do not correctly differentiate methods and properties,
leading to problems when calling these methods."
My question is: what actually makes a difference?
It is strictly a software convention. A property has methods that start
with get_ and/or put_, with one parameter. So, for a property called
"Size", you would have methods called get_Size and put_Size, each taking
one parameter.

As you can see, it's a bit squishy. There's no better way to do that in
C++.
--
Tim Roberts, ***@probo.com
Providenza & Boekelheide, Inc.
Loading...