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

RE: orthogonality and generalized references (was Re: Zen of Python)



   Date: Tue, 28 May 2002 13:14:08 -0700
   From: "Todd Proebsting" <toddpro@microsoft.com>

   Guy, you and I are both right, I believe.  My example is correct, but my
   description is incorrect.
   
   My example sets the value of dict["foo"] to 42 iff dict["foo"] was null,
   as I wanted it to.  My description of / is, however, backwards as you
   point out.  (I.e., the / computes the l-value iff the r-value *is*
   null.)

And I was less than clear: I had included the example

  \dict["foo"] := 42
  
not as a proposed replacement for your example

  /dict["foo"] := 42

but as a contrasting example to illustrate the differing
behavior of "\" as opposed to "/".

Just for fun, we can contemplate the meaning of

  /dict["foo"] := \dict["bar"]

and how it subtly differs from

  dict["foo"] := \dict["bar"]

--Guy