[PyQt] A question about QImage

Paul A. Giannaros paul at giannaros.org
Sun Sep 21 23:12:30 BST 2008


No copies of objects are ever made in Python using the assignment
operator (generally speaking at least... attribute access is a
different can of fish). Unlike in other programming languages you
cannot modify the functionality of the assignment operator. It simply
binds names to variables; that is all.

Paul

On Sun, Sep 21, 2008 at 11:32 AM, Grissiom <chaos.proton at gmail.com> wrote:
> Hi, all,
>
> If I do some thing like this:
>
> im=QImage()
> im.load("some.png")
> im2=im
> def fun(in):
>     im3=in
> fun(im)
>
> Then the im2 and im3 is only a referance of im or a copy of it?
>
> --
> Cheers,
> Grissiom
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>


More information about the PyQt mailing list