Thursday, 5 September 2013

what's the difference between assign and bound when talking about variable?

what's the difference between assign and bound when talking about variable?

Except from http://www.stavros.io/tutorials/python/
# This swaps the variables in one line(!).
# It doesn't violate strong typing because values aren't
# actually being assigned, but new objects are bound to
# the old names.
>>> myvar, mystring = mystring, myvar
I don't understand the point he is making.

No comments:

Post a Comment