Dennis Lee Bieber <wlfr...@ix.netcom.com> writes:

> def swapFunc(a, b):
>       return b, a

That's not what a `swap' function should do.

> > Alas, Python is actually slightly confusing here, since the same
> > notation `=' sometimes means assignment and sometimes means mutation.
>
>       "=" means just one thing, a rebinding of some identifier to a
> different object.

Names aren't bound to objects.  See elsewhere.

>       Or, in more general, "=" rebinds the fully qualified name to a
> different object, which has the result of mutating a partially qualified
> name (a name whose suffix has be removed).

Names aren't mutated at all.  Values (or, synonymously, objects) are
mutated.

-- [mdw]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to