Re: How come this is different?

eryk sun <[email protected]> Sat, 10 Dec 2016 21:16:24 +0000
Newsgroups gmane.comp.python.ctypes
Message-ID <CACL+1asMeV70LYZmxwzYTCFBTk+pfQ4wrLWSju0QKPXh5mUzAg@mail.gmail.com>
On Sat, Dec 10, 2016 at 7:44 PM, Michael C
<[email protected]> wrote:
> what does this do?
>
> source_array = (wintypes.DWORD * 10)(*range(10))

That's creating an array of 10 DWORD values, {0,1,2,3,4,5,6,7,8,9},
which is used for the the demo. ctypes arrays are initialized with
positional arguments, which is why it uses the splat (*) operator on
range(10).

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi