Assignment not the same as defining?

Steve Holden sholden at holdenweb.com
Wed Oct 3 12:29:46 EDT 2001


"Greg Weeks" <weeks at vitus.scs.agilent.com> wrote in message
news:1002126344.97387 at cswreg.cos.agilent.com...
> John J. Lee (jjl at pobox.com) wrote:
> : On Wed, 3 Oct 2001, Oleg Broytmann wrote:
>
> : > On Wed, Oct 03, 2001 at 12:35:58PM +0100, Dale Strickland-Clark wrote:
> : [...]
> : >    Python does not have assingment at all.
> : > a = b
> : >    is not assignment in Python - it is binding and rebinding.
Reference to
> : > b copied into a. Only reference, not an object.
> : [...]
>
> : true
>
> But also false.  In other words, it is a matter of vocabulary.
> Value-to-variable binding is essentially the same in Lisp as in Python,
and
> Lispers call it assignment.
>
Well, the documentation dares to call them assignment statements (see RefMan
6.3), so I don't see why we shouldn't think of the operation as assignment
(even if it's a reference that's being assigned), and even call it that. The
main thing is to remember that assignment is only one of the several (I seem
to remember Tim Peters listed five) ways to bind a value to a name.

though-i'm-not-really-into-bondage-ly y'rs  - steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list