[python-win32] win32com problem with LabVIEW
Konstantin Veretennicov
kveretennicov at gmail.com
Sat Jun 25 12:24:26 CEST 2005
On 6/25/05, Kuner Martin <martin.kuner at thomson.net> wrote:
> Is that behaviour with returnvalues only valid for COM accesses, or is it standard python ?
It is standard Python, of course, like the rest of win32com interface.
Python has no "out" parameters per se, but any function can return
tuple:
>>> div_and_mod = divmod(9, 4)
>>> div_and_mod
(2, 1)
A tuple can be unpacked to separate variables:
>>> div, mod = div_and_mod
>>> div
2
>>> mod
1
But you can always combine tuple unpacking with function call:
>>> div, mod = divmod(9, 4)
HTH,
- kv
More information about the Python-win32
mailing list