Python ver of System.arraycopy() in Java

Miki miki.tebeka at gmail.com
Mon Jul 14 23:16:49 EDT 2008


Hello,

> I could seem to find a built in function that would serve the purpose
> of System.arraycopy() in java.
>
> I was able to accomplish it with something like this:
>
> def arraycopy(source, sourcepos, dest, destpos, numelem):
>     dest[destpos:destpos+numelem] = source[sourcepos:sourcepos
> +numelem]
>
> is there a built in version, or better way of doing this...
This *is* the built in way :)

HTH,
--
Miki <miki.tebeka at gmail.com>
http://pythonwise.blogspot.com





More information about the Python-list mailing list