Inheriting the @ sign from Ruby

Fredrik Lundh fredrik at effbot.org
Tue Dec 12 17:26:28 CET 2000


Roy Katz wrote:
> Why do we have to explain to new Python programmers how the
> label-value system Python uses is different than traditional call-by-
> reference and call-by-value?

Do we?  Of course there are people who don't understand that
different languages do things in different ways, but they're not
that common.

The real problem is that many Python tutorials fail to explain
how things work (or hide it somewhere in the exercises), but
that's not really Guido's fault...

> (I've been programming in Python for three years now and I
> understand only that passing an int or float is call-by-value,
> otherwise it is call-by-reference.

Which means that you don't understand how it works...

(Hint: Everything is a reference to an object.  Variables are
named references, not actual objects.  Some objects can be
modified in place.  Some cannot be modified.  That's all)

</F>

<!-- (the eff-bot guide to) the standard python library:
http://www.pythonware.com/people/fredrik/librarybook.htm
-->





More information about the Python-list mailing list