[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] A question about QImage
From:       "Paul A. Giannaros" <paul () giannaros ! org>
Date:       2008-09-21 22:12:30
Message-ID: 3cce4fc80809211512u6661de9focb78401da02cc537 () mail ! gmail ! com
[Download RAW message or body]

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@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@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic