git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I'm wrong or Will we fix the ducks limp?


On Saturday, June 4, 2016 at 3:55:12 AM UTC+12, Matt Wheeler wrote:
> It's best to think of them as names, rather than variables, as names in
> python don't behave quite how you'll expect variables to if you're coming
> from some other languages.

I have made heavy use of Python as well as many other languages, and I don?t know what you mean. What ?other languages? are you thinking of?

Are variables like little boxes? Yes they are. But they are all the same size, while objects may be large (even very large) or small. That is why variables hold, not objects, but references to objects.

(This makes no difference for immutable objects, only mutable ones.)