Finding the instance reference of an object

Joe Strout joe at strout.net
Thu Oct 30 23:07:08 EDT 2008


On Oct 30, 2008, at 6:58 PM, greg wrote:

> For what it's worth, I happen to agree that telling
> someone that Python passes parameters "by value" without
> being sure they understand exactly what "by value"
> means, is not a good idea -- not because the term
> isn't well-defined, but because of the widespread
> confusion out there about it.
>
> But equally I wouldn't tell someone that it's *not*
> by value, because if they do happen to correctly
> understand what it means, that will confuse them just
> as much.
>
> So my recommendation is just to tell them that it
> works by assigning the result of evaluating the actual
> parameter to the formal parameter.
>
> If they understand how assignment works in Python, that
> tells them all they need to know.
>
> If they don't understand how assignment works, then they
> have a more fundamental knowledge gap that needs to be
> corrected first.

That's a very sensible stance.  +1!

Best,
- Joe









More information about the Python-list mailing list