On May 10, 6:19 pm, lazy <[EMAIL PROTECTED]> wrote:
> So, just to make sure even if I return a value, there is no copy done.
> Is it correct?
> For eg:
>
> def blah:
>    long_str="...."
>    return long_str
>
> my_str=blah() <=== So here there is no copy done but, my_str points to
> the same memory where long_str was created.

Exactly. As Bruno said, Python does not copy objects unless you
specifically tell it to.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to