DaveM wrote:
On Sun, 27 Jul 2008 19:46:32 +0200, "Diez B. Roggisch" <[EMAIL PROTECTED]>
wrote:
As a rule of thumb, don't return objects you didn't create inside a
function from scratch.
Unless its job is specifically to get/fetch an object (reference
thereto) from someplace the caller cannot or should not access. But
then it should probably not mutate the object before returning the
reference.
I wish I'd had that advice when I started learning python. It would have
saved me no end of grief.
I wish I had seen this 'rule' before too.
--
http://mail.python.org/mailman/listinfo/python-list