Python ver of System.arraycopy() in Java

Jordan JordanNealBerg at gmail.com
Mon Jul 14 20:39:14 EDT 2008


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...



More information about the Python-list mailing list